Fixed the Backend and added Voice recognition API

This commit is contained in:
Patrick_Pluto 2024-09-24 10:36:12 +02:00
parent 3588a4b703
commit de4a6145af
3 changed files with 27 additions and 11 deletions

View file

@ -7,5 +7,7 @@ class VoiceRecognition:
r = sr.Recognizer()
if option == "online":
return r.recognize_google_cloud(audio)
if option == "offline":
elif option == "offline":
return r.recognize_sphinx(audio)
return False