Änderungen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche

Python Grundlagen

242 Byte hinzugefügt, 18:49, 18. Apr. 2019
/* Spracherkennung */
https://www.lfd.uci.edu/~gohlke/pythonlibs/<br>
<pre>pip install PyAudio-0.2.11-cp37-cp37m-win_amd64.whl</pre>
 
<pre>
import speech_recognition as sr
 
r = sr.Recognizer()
 
with sr.Microphone() as mp:
print('say')
audio = r.listen(mp)
try:
#print(r.recognize_sphinx(audio))
print(r.recognize_google(audio, language="de-DE"))
except:
pass
</pre>
688
Bearbeitungen