使用语音自适应 Google 语音 API 更好地识别首字母缩略词
Better Acronym Recognition with Google Speech API using Speech Adaptation
我正在使用 Google Speech Streaming API 并希望它能识别不常见的首字母缩略词。
我尝试将首字母缩写词“LHD”添加到语音识别请求中,但当它识别出首字母缩写词时,它是 LED。到目前为止,它还没有识别出 LHD。
有什么方法可以提高识别度或更好地表明这是首字母缩写词吗?
我的识别请求配置是:
{
encoding: 'LINEAR16',
sampleRateHertz: 16000,
languageCode: 'en-US',
model: 'video',
enableAutomaticPunctuation: true,
speechContexts: [ {
phrases : [
"LHD"
]
} ]
},
interimResults: true
}
你应该加一个“提升”。
如 Google Speech To Text docs' Fine-tune transcription results using boost 中所述:
By default model adaptation provides a relatively small effect, especially for one-word phrases. The model adaptation boost feature allows you to increase the recognition model bias by assigning more weight to some phrases than others. We recommend that you implement boost if 1) you have already implemented model adaptation, and 2) you would like to further adjust the strength of model adaptation effects on your transcription results.
尝试改变这个:
phrases : [
"LHD"
]
为此:
phrases : [
{
"value": "LHD",
"boost": 10
}
]
最后,你会得到这样的东西:
{
encoding: 'LINEAR16',
sampleRateHertz: 16000,
languageCode: 'en-US',
model: 'video',
enableAutomaticPunctuation: true,
speechContexts: [ {
phrases : [
{
"value": "LHD",
"boost": 10
}
]
}
],
interimResults: true
}
编辑:我认为你必须使用 Google\Cloud\Speech\V1p1beta1,而不是 V1。
编辑 2:
另请参阅使用 CustomClass。在这里你会明白为什么: Cloud Speech to text documentation Supported class tokens 。您可以修改 class 标记,如“$OOV_CLASS_ALPHA_SEQUENCE”,表示您需要一个首字母缩略词。
我正在使用 Google Speech Streaming API 并希望它能识别不常见的首字母缩略词。
我尝试将首字母缩写词“LHD”添加到语音识别请求中,但当它识别出首字母缩写词时,它是 LED。到目前为止,它还没有识别出 LHD。
有什么方法可以提高识别度或更好地表明这是首字母缩写词吗?
我的识别请求配置是:
{
encoding: 'LINEAR16',
sampleRateHertz: 16000,
languageCode: 'en-US',
model: 'video',
enableAutomaticPunctuation: true,
speechContexts: [ {
phrases : [
"LHD"
]
} ]
},
interimResults: true
}
你应该加一个“提升”。 如 Google Speech To Text docs' Fine-tune transcription results using boost 中所述:
By default model adaptation provides a relatively small effect, especially for one-word phrases. The model adaptation boost feature allows you to increase the recognition model bias by assigning more weight to some phrases than others. We recommend that you implement boost if 1) you have already implemented model adaptation, and 2) you would like to further adjust the strength of model adaptation effects on your transcription results.
尝试改变这个:
phrases : [
"LHD"
]
为此:
phrases : [
{
"value": "LHD",
"boost": 10
}
]
最后,你会得到这样的东西:
{
encoding: 'LINEAR16',
sampleRateHertz: 16000,
languageCode: 'en-US',
model: 'video',
enableAutomaticPunctuation: true,
speechContexts: [ {
phrases : [
{
"value": "LHD",
"boost": 10
}
]
}
],
interimResults: true
}
编辑:我认为你必须使用 Google\Cloud\Speech\V1p1beta1,而不是 V1。
编辑 2: 另请参阅使用 CustomClass。在这里你会明白为什么: Cloud Speech to text documentation Supported class tokens 。您可以修改 class 标记,如“$OOV_CLASS_ALPHA_SEQUENCE”,表示您需要一个首字母缩略词。