Spaces:
Paused
Paused
Update stt_google.py
Browse files- stt_google.py +6 -1
stt_google.py
CHANGED
|
@@ -476,5 +476,10 @@ class GoogleCloudSTT(STTInterface):
|
|
| 476 |
"FLAC": speech.RecognitionConfig.AudioEncoding.FLAC,
|
| 477 |
"MP3": speech.RecognitionConfig.AudioEncoding.MP3,
|
| 478 |
"OGG_OPUS": speech.RecognitionConfig.AudioEncoding.OGG_OPUS,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 479 |
}
|
| 480 |
-
|
|
|
|
|
|
| 476 |
"FLAC": speech.RecognitionConfig.AudioEncoding.FLAC,
|
| 477 |
"MP3": speech.RecognitionConfig.AudioEncoding.MP3,
|
| 478 |
"OGG_OPUS": speech.RecognitionConfig.AudioEncoding.OGG_OPUS,
|
| 479 |
+
"MULAW": speech.RecognitionConfig.AudioEncoding.MULAW,
|
| 480 |
+
"AMR": speech.RecognitionConfig.AudioEncoding.AMR,
|
| 481 |
+
"AMR_WB": speech.RecognitionConfig.AudioEncoding.AMR_WB,
|
| 482 |
+
"ENCODING_UNSPECIFIED": speech.RecognitionConfig.AudioEncoding.ENCODING_UNSPECIFIED
|
| 483 |
}
|
| 484 |
+
# Default to LINEAR16 if not found
|
| 485 |
+
return encoding_map.get(encoding_str.upper(), speech.RecognitionConfig.AudioEncoding.LINEAR16)
|