Skip to content Skip to sidebar Skip to footer

How To Input And Process Audio Files To Convert To Text Via Pyspeech Or Dragonfly

I have seen the documentation of pyspeech and dragonfly, but don't know how to input an audio file to be converted into text. I have tried it with microphone via speaking to it and

Solution 1:

Both PySpeech and Dragonfly are relatively thin wrappers over SAPI. Unfortunately, both of them use the shared recognizer, which doesn't support input selection. While I'm familiar with SAPI, I'm not that familiar with Python, so I haven't been able to assist anyone with moving PySpeech/Dragonfly over to an in-process recognizer.


Solution 2:

import speech_recognition as sr
print(sr.__version__)
r = sr.Recognizer()

audio_file = sr.AudioFile('audio_file.wav')

with audio_file as source:
   audio = r.record(source)

print(type(audio))
print(r.recognize_google(audio))

Post a Comment for "How To Input And Process Audio Files To Convert To Text Via Pyspeech Or Dragonfly"