diff --git a/speech2text.py b/speech2text.py index 282d0a2..84f19e5 100644 --- a/speech2text.py +++ b/speech2text.py @@ -131,7 +131,9 @@ class SpeechApp(Gtk.Window): wf.setframerate(SAMPLE_RATE) wf.writeframes((audio_np * 32767).astype(np.int16).tobytes()) - result = model.transcribe(tmpfile.name) + # In the transcribe_and_type method, modify the transcribe call: + # Replace "en" with your desired language code + result = model.transcribe(tmpfile.name, language="en") text = result["text"].strip() # Display the text in the text area