speech_recognition
speech_recognition copied to clipboard
issue with converting the audio in to text
Hi All,
I have 15 second of audio file in .mav format and passed that audio in to the below code . it will not providing complete text. only providing me 06 sec text .
can anyone guide me please what is the issue?
it will give me the text for next import speech_recognition as sr r = sr.Recognizer() os.chdir('\Speaker_diarization_Reporting_matrix\cluster_audio-chunks') folder = "Speaker_diarization_Reporting_matrix\cluster_audio-chunks' filename = "chunk2.wav"
filename = "test.wav"
with sr.AudioFile(filename) as source:
listen for the data (load audio to memory)
audio_data = r.record(source)
# recognize (convert from speech to text)
text = r.recognize_google(audio_data)
print(text)