menip / godot_speech_to_text

Speech to text module for Godot 3
https://samuraisigma.github.io/godot-docs/doc/community/tutorials/misc/speech_to_text.html
MIT License
33 stars 2 forks source link

Help with get() on STTqueue #7

Open middlepattern opened 3 years ago

middlepattern commented 3 years ago

Discussed in https://github.com/menip/godot_speech_to_text/discussions/6

Originally posted by **middlepattern** July 5, 2021 I'm wondering if anyone can help with this: When I try to use the 'get()' command on my queue (something like...): > user_input = stt.get_queue().get() > print(user_input) I get an error saying: _"Invalid call to function 'get' in base 'STTQueue'. Expected 1 arguments._ It seems to want a string arg, but I'm not sure what string it wants. Also, in the inspector the queue only shows one property "capacity", which is the number of keywords it's holding - but there does not seem to be an array or resource or something where I can access the spoken words. I apologize if this is not an issue for anyone else.
ksiotis commented 2 years ago

I looked into the code a little bit and found that the next() function does what the get() was supposed to. Might have been renamed at some point. eg:

if not q.empty():
  print(q.next())