[英]Is it possible to set additional languages using C# package Google.Cloud.Speech.V1P1Beta1?
是否可以使用RecognitionConfig.AlternativeLanguageCodes中的C#包Google.Cloud.Speech.V1P1Beta1设置其他语言?
在1.0.0-beta02版本中,尽管在Google Cloud文档中提到该字段,但我可以看到该字段仅可读,我们可以设置三种其他语言。
我该怎么做? 有谁知道这个软件包的更新版本吗?
下面的示例代码应该可以帮助您
var RecogCfg =新的Google.Cloud.Speech.V1P1Beta1.RecognitionConfig {
// Encoding = EncodeType,
//SampleRateHertz = Int32.Parse(SampleRate),
LanguageCode = Lang,
// EnableAutomaticPunctuation = true,
//EnableWordTimeOffsets = true,
MaxAlternatives = 5,
Model= "default"
};
//add one or more alternative language codes
RecogCfg.AlternativeLanguageCodes.Add("<Language Code 1>");
RecogCfg.AlternativeLanguageCodes.Add("<Language Code 2>");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.