support google stt version 2 (#49)

* support google stt version 2

* fix review comments

* fix review comment
This commit is contained in:
Hoan Luu Huu
2024-04-02 06:14:06 +07:00
committed by GitHub
parent f8d07d340a
commit 030eb5f847
2 changed files with 36 additions and 0 deletions

View File

@@ -646,6 +646,7 @@
"awsOptions": "#awsOptions",
"azureOptions": "#azureOptions",
"assemblyAiOptions": "#assemblyAiOptions",
"googleOptions": "#googleOptions",
"customOptions": "#customOptions"
},
"required": [
@@ -698,6 +699,20 @@
"required": [
]
},
"googleOptions" : {
"properties": {
"serviceVersion": {
"type": "string",
"enum": [
"v1",
"v2"
]
},
"speechStartTimeoutMs": "number",
"speechEndTimeoutMs": "number",
"transcriptNormalization": "array"
}
},
"cobaltOptions": {
"properties": {
"serverUri": "string",

View File

@@ -412,6 +412,27 @@ test("validate correct verbs", async (t) => {
"interim": true
}
},
{
"verb": "transcribe",
"transcriptionHook": "http://example.com/transcribe",
"recognizer": {
"vendor": "nvidia",
"language" : "en-US",
"interim": true,
"googleOptions": {
"serviceVersion": "v2",
"speechStartTimeoutMs": 500,
"speechEndTimeoutMs": 1000,
"transcriptNormalization" : [
{
"search": "dog",
"replace": "cat",
"case_sensitive": true
}
]
}
}
},
{
"verb": "rest:dial",
"account_sid": "1291964182631236912836123912",