Spaces:
Build error
Build error
Update audio_foundation_models.py
Browse files
audio_foundation_models.py
CHANGED
@@ -515,6 +515,10 @@ class ASR:
|
|
515 |
options = whisper.DecodingOptions()
|
516 |
result = whisper.decode(self.model, mel, options)
|
517 |
return result.text
|
|
|
|
|
|
|
|
|
518 |
|
519 |
class A2T:
|
520 |
def __init__(self, device):
|
|
|
515 |
options = whisper.DecodingOptions()
|
516 |
result = whisper.decode(self.model, mel, options)
|
517 |
return result.text
|
518 |
+
|
519 |
+
def translate_english(self, audio_path):
|
520 |
+
audio = self.model.transcribe(audio_path, language='English')
|
521 |
+
return audio['text']
|
522 |
|
523 |
class A2T:
|
524 |
def __init__(self, device):
|