Speech Recognition failed
-
Hello guys, I have a code where every 5 seconds the skript check if there is any keyword. But I get the error: Speech Recognition failed. I don‘t know why? My Code:
s = ui.Switch() s.frame = (970,1,600,40) def s_action(sender): global timestamp recorder = sound.Recorder('speech.m4a') recorder.record() if s.value == True: while True: if s.value == False: break elif clock2.uhrgedruckt == True: clock2.uhrgedruckt = False print('ok') elif timestamp - time.time() <= -5: recorder.stop() result = speech.recognize('speech.m4a', 'de_DE') if result[0][0] == 'Hallo': print('Du hast hallo gesagt') timestamp = time.time() recorder.record() else: print('Fehler') timestamp = time.time() recorder.record() else: pass s.action = s_action
-
@cvp if that‘s not possible, can I create an apk file?
-
@Python567 I suppose you can't but, sincerely, I don't have any skill about Android.
-
@cvp ok, and for ios?
-
@Python567 if your question is still relative to a teams bot, I can't help at all.
-
@cvp No that‘s an other question, nothing with teams bots. I ask because I found a video on youtube who somebody have his own app on the home screen (but it‘s not already in the Apple Store!) and I don‘t know how to do that, I found something in the internet but that‘s only with apk, but the youtuber has ios.
-
@Python567 there are not so much solutions in iOS.
Either you develop your own app on your Mac and you can put it on the Home Screen, even without putting it on the App Store.
Either you develop, thanks to an app like Pythonista (or Pyto), and you can put your own icon on the Home Screen, and you tap the icon, for instance, you launch a shortcut which launch Pythonista and runs your Python script.
-
@cvp Do I really need a Mac for that, because I haven‘t got one
-
@Python567 if you want to write a real app, yes you need a Mac.
But, I think you can develop almost all with Pythonista.
-
@cvp and if I want my app on my homw screen without doing it in the App Store
-
@Python567 if it is a real app, you need a Mac.
-
@cvp but I don‘t want a real app for the app store, only for my home screen
-
@Python567 😢real app = Mac, App Store or not
-
Maybe he means a Homescreen Symbol.
@Python567, see here, if yes:shortcuts
But you need to install Pythonista for each User.
-
last edited by
-
Ok, than I do it with shortcuts
-
@cvp can I install the pythonista modules with pip?
-
@Python567 if modules are yours, then no.
if modules are standard ones, they are already included in Pythonista.
Thus, which modules?
-
@cvp sorry, I mean: Can I install pythonista modules with pip on my pc? For example: ui, scene, etc.?
-
@Python567 no. What do you want to do with Pythonista on your pc?
-
@cvp I want to run my skript on my pc. what do you mean before?