krishikotha / test_whisper.py
DipannitaOrni's picture
Working voice pipeline: Bangla STT and TTS in Streamlit app
31e64f5
Raw
History Blame Contribute Delete
382 Bytes
from transformers import pipeline
# Bangla fine-tuned Whisper model
asr = pipeline(
"automatic-speech-recognition",
model="bangla-speech-processing/BanglaASR"
)
def listen(audio_file_path: str) -> str:
result = asr(audio_file_path)
return result["text"]
if __name__ == "__main__":
result = listen("test_audio_fixed.wav")
print("Transcribed text:", result)