From 6c83ac8b7cf7d8336cfe42a8ea719ca44e993ad8 Mon Sep 17 00:00:00 2001 From: "snorkell-ai[bot]" <146478655+snorkell-ai[bot]@users.noreply.github.com> Date: Mon, 30 Oct 2023 16:04:41 +0000 Subject: [PATCH] [Snorkell.ai]: Documentation for SphinxConfig.java --- .../engines/speechtotext/SphinxConfig.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main/java/org/apache/stanbol/enhancer/engines/speechtotext/SphinxConfig.java b/src/main/java/org/apache/stanbol/enhancer/engines/speechtotext/SphinxConfig.java index 11844e8..15fdce8 100644 --- a/src/main/java/org/apache/stanbol/enhancer/engines/speechtotext/SphinxConfig.java +++ b/src/main/java/org/apache/stanbol/enhancer/engines/speechtotext/SphinxConfig.java @@ -63,6 +63,20 @@ public SphinxConfig() { } + /** + * Initializes the configuration by setting the language model, acoustic model, and dictionary model. + * + * @param MPi the ModelProvider used to retrieve the models + * @return true if the models are successfully initialized, false otherwise + * @throws NullPointerException if MPi is null + * @throws ModelNotFoundException if the default models are not found + * + * Example usage: + *
{@code
+ * ModelProvider modelProvider = new ModelProvider();
+ * boolean isInitialized = initConfig(modelProvider);
+ * }
+ */
protected boolean initConfig(ModelProvider MPi) {
this.MPi=MPi;
lmodel=new LanguageModel();