Speech to text, or almost voice chat - Printable Version +- Xonotic Forums (https://forums.xonotic.org) +-- Forum: Creating & Contributing (https://forums.xonotic.org/forumdisplay.php?fid=10) +--- Forum: Xonotic - Development (https://forums.xonotic.org/forumdisplay.php?fid=12) +--- Thread: Speech to text, or almost voice chat (/showthread.php?tid=9451) |
Speech to text, or almost voice chat - oblector - 06-30-2022 I describe how to chat while playing, by speaking (not typing), without the necessity of the recipients installing additional software. As it is a kludge, you may want to change the details. First install some speech to text software, such as nerd-dictation. Remember to download models for one or more languages. As far I know, for security Xonotic can not execute external programs. So we'll have a script for executing nerd-dictation when some specific files in the .xonotic directory get changed. Consider the following script (depending on inotify tools), which you may need to adapt, as it presupposes some directory names and that the models you have are named model-en and model-pt. Code: #!/bin/bash Inside the .xonotic/data/ directory create the empty files: voiceout, voicestop, en and pt. Add the following (or similar) to .xonotic/data/autoexec.cfg: Code: set nerddic_text "<unitialized>" Then start the bash script, and run Xonotic. Note that some files are modified with condump, which writes the entire console history, a bit inefficient. Anyway, speech to text demands more power and time. You may change the language with the Xonotic console command lang pt. You may bind some of these commands to some key presses; the command voiceshowres shows the interpreted text before publishing. You may want to change the code to automatically send the text after recording; caution with race conditions. It seems to be slightly practical (not much in phrenetic games). I couldn't test it rigorously because I'm not a fluent anglophone, nor I have a quality microphone. Thanks for the attention. Suggestions? Also, I'm grateful for this marvelous game. |