Inverse text normalization API of streaming ASR for various programming languages (#1022)

This commit is contained in:
Fangjun Kuang
2024-06-18 13:42:17 +08:00
committed by GitHub
parent 349d957da2
commit 6789c909d2
64 changed files with 849 additions and 55 deletions

View File

@@ -85,6 +85,10 @@ larger than this value. Used only when --enable-endpoint is true.")]
[Option("hotwords-score", Required = false, Default = 1.5F, HelpText = "hotwords score")]
public float HotwordsScore { get; set; }
[Option("rule-fsts", Required = false, Default = "",
HelpText = "If not empty, path to rule fst for inverse text normalization")]
public string RuleFsts { get; set; }
[Option("files", Required = true, HelpText = "Audio files for decoding")]
public IEnumerable<string> Files { get; set; }
@@ -189,6 +193,7 @@ to download pre-trained streaming models.
config.Rule3MinUtteranceLength = options.Rule3MinUtteranceLength;
config.HotwordsFile = options.HotwordsFile;
config.HotwordsScore = options.HotwordsScore;
config.RuleFsts = options.RuleFsts;
OnlineRecognizer recognizer = new OnlineRecognizer(config);