Forum Programmation.python pocketsphinx

Posté par  . Licence CC By‑SA.
Étiquettes : aucune
1
27
avr.
2021
import speech_recognition as sr
from pocketsphinx import *
r = sr.Recognizer()
print(sr.Microphone.list_microphone_names(),end = "\n")
micro = sr.Microphone(device_index=2)
with micro as source:
    print("Speak!")
    audio_data = r.listen(source)
    print("End!")
result = r.recognize_sphinx(audio_data,language="fr-FR")
print (">", result)

Bonjour,Ca fonctionne avec (…)