Godot Version
4.3
Question
I am trying to add speech to text to my game via running a python script, then getting the output with OS.execute. However, I get no output and the program crashes. Here is my godot code:
func _on_talk_button_pressed() → void:
var output =
var exit_code = OS.execute(“python3”, [PATHTOFILE], output, false)
print(“Exit code:”, exit_code)
print(“Output:”, output)
The python script continuously runs and outputs the words the microphone picks up. I feel the issue may have something to do with the fact that the python script doesn’t stop running by itself and just keeps listening, but I want it to run and the godot game at the same time.
I would be thankful for any help.