Update decoder parameter names in native client
This commit is contained in:
parent
f007e341b6
commit
366a82d7e7
@ -84,12 +84,12 @@ namespace DeepSpeechClient
|
||||
/// <param name="aAlphabetConfigPath">The path to the configuration file specifying the alphabet used by the network.</param>
|
||||
/// <param name="aLMPath">The path to the language model binary file.</param>
|
||||
/// <param name="aTriePath">The path to the trie file build from the same vocabulary as the language model binary.</param>
|
||||
/// <param name="aLMWeight">The weight to give to the language model results when scoring.</param>
|
||||
/// <param name="aValidWordCountWeight">The weight (bonus) to give to beams when adding a new valid word to the decoding.</param>
|
||||
/// <param name="aLMAlpha">The alpha hyperparameter of the CTC decoder. Language Model weight.</param>
|
||||
/// <param name="aLMBeta">The beta hyperparameter of the CTC decoder. Word insertion weight.</param>
|
||||
/// <returns>Zero on success, non-zero on failure (invalid arguments).</returns>
|
||||
public unsafe int EnableDecoderWithLM(string aAlphabetConfigPath,
|
||||
string aLMPath, string aTriePath,
|
||||
float aLMWeight, float aValidWordCountWeight)
|
||||
float aLMAlpha, float aLMBeta)
|
||||
{
|
||||
string exceptionMessage = null;
|
||||
if (string.IsNullOrWhiteSpace(aTriePath))
|
||||
@ -110,8 +110,8 @@ namespace DeepSpeechClient
|
||||
aAlphabetConfigPath,
|
||||
aLMPath,
|
||||
aTriePath,
|
||||
aLMWeight,
|
||||
aValidWordCountWeight);
|
||||
aLMAlpha,
|
||||
aLMBeta);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -12,8 +12,8 @@
|
||||
unsafe int EnableDecoderWithLM(string aAlphabetConfigPath,
|
||||
string aLMPath,
|
||||
string aTriePath,
|
||||
float aLMWeight,
|
||||
float aValidWordCountWeight);
|
||||
float aLMAlpha,
|
||||
float aLMBeta);
|
||||
|
||||
unsafe string SpeechToText(short[] aBuffer,
|
||||
uint aBufferSize,
|
||||
|
@ -25,8 +25,8 @@ namespace DeepSpeechClient
|
||||
string aAlphabetConfigPath,
|
||||
string aLMPath,
|
||||
string aTriePath,
|
||||
float aLMWeight,
|
||||
float aValidWordCountWeight);
|
||||
float aLMAlpha,
|
||||
float aLMBeta);
|
||||
|
||||
[DllImport("libdeepspeech.so", CallingConvention = CallingConvention.Cdecl,
|
||||
CharSet = CharSet.Ansi, SetLastError = true)]
|
||||
|
@ -609,11 +609,11 @@ DS_EnableDecoderWithLM(ModelState* aCtx,
|
||||
const char* aAlphabetConfigPath,
|
||||
const char* aLMPath,
|
||||
const char* aTriePath,
|
||||
float aLMWeight,
|
||||
float aValidWordCountWeight)
|
||||
float aLMAlpha,
|
||||
float aLMBeta)
|
||||
{
|
||||
try {
|
||||
aCtx->scorer = new Scorer(aLMWeight, aValidWordCountWeight,
|
||||
aCtx->scorer = new Scorer(aLMAlpha, aLMBeta,
|
||||
aLMPath ? aLMPath : "",
|
||||
aTriePath ? aTriePath : "",
|
||||
*aCtx->alphabet);
|
||||
|
@ -57,10 +57,10 @@ void DS_DestroyModel(ModelState* ctx);
|
||||
* @param aLMPath The path to the language model binary file.
|
||||
* @param aTriePath The path to the trie file build from the same vocabu-
|
||||
* lary as the language model binary.
|
||||
* @param aLMWeight The weight to give to language model results when sco-
|
||||
* ring.
|
||||
* @param aValidWordCountWeight The weight (bonus) to give to beams when
|
||||
* adding a new valid word to the decoding.
|
||||
* @param aLMAlpha The alpha hyperparameter of the CTC decoder. Language Model
|
||||
weight.
|
||||
* @param aLMBeta The beta hyperparameter of the CTC decoder. Word insertion
|
||||
weight.
|
||||
*
|
||||
* @return Zero on success, non-zero on failure (invalid arguments).
|
||||
*/
|
||||
@ -69,8 +69,8 @@ int DS_EnableDecoderWithLM(ModelState* aCtx,
|
||||
const char* aAlphabetConfigPath,
|
||||
const char* aLMPath,
|
||||
const char* aTriePath,
|
||||
float aLMWeight,
|
||||
float aValidWordCountWeight);
|
||||
float aLMAlpha,
|
||||
float aLMBeta);
|
||||
|
||||
/**
|
||||
* @brief Use the DeepSpeech model to perform Speech-To-Text.
|
||||
|
Loading…
x
Reference in New Issue
Block a user