Tremulous Forum
General => Feedback => Topic started by: Raumkraut on May 22, 2006, 04:19:34 pm
-
One thing that I miss from UT2K4 is it's text-to-speech functionality.
Let's face it, who really has time to check the chat lines in the middle of a firefight?
Perhaps Festival (http://www.cstr.ed.ac.uk/projects/festival/) could be leveraged for this purpose..?
-
How about we use speech to erm... well... speech? It would be easier (I think), and it's faster than typing (but most of that was covered in another thread).
I suppose we could do speech to text, with text to speech also, that way everyone can hear/see what teammates are saying/typing.
-
How about we use speech to erm... well... speech? It would be easier (I think), and it's faster than typing (but most of that was covered in another thread).
I suppose we could do speech to text, with text to speech also, that way everyone can hear/see what teammates are saying/typing.
that would be the coolest. i know that sometimes I can't play with volume up and i also sometimes dont have a mic handy, so it would be cool to see everything in text and simultaneously hear everything. i imagine spam would get really annoying with text-to-speech tho.
-
How about we use speech to erm... well... speech? It would be easier (I think), and it's faster than typing (but most of that was covered in another thread).
I suppose we could do speech to text, with text to speech also, that way everyone can hear/see what teammates are saying/typing.
that would be the coolest. i know that sometimes I can't play with volume up and i also sometimes dont have a mic handy, so it would be cool to see everything in text and simultaneously hear everything. i imagine spam would get really annoying with text-to-speech tho.
Yeah, in UT2004 the funniest thing to do was to say "wwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwwww"
8)
-
I just have to ask, what does "wwwwwwwwwwwwwwwwwwwwwwwwwww" sound like???
-
double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u, double u ...
;)
-
Forget speech!..
What T. need is a easy to use scripting code to make graphical menus, with a builting team menu to report:
INCOMMING TYRANT!!!!....[%L]
(where %L wil be parsed to a location area, QuakeWorld style)
-
Forget speech!..
What T. need is a easy to use scripting code to make graphical menus, with a builting team menu to report:
INCOMMING TYRANT!!!!....[%L]
(where %L wil be parsed to a location area, QuakeWorld style)
Well, I would settle for just placing the location in any "say team" message. No need for that special %L handling.
It would show like that :
"[H]Stof ( Big pipe room ) : Found OM"
"[A]Stof ( Bloody room ) : new OM is building"
Etc ...
-
I was thinking sort of the same thing, but I don't think the current maps have any of the rooms actually named, like in quake III.
-
That still doesn't help if the message zips past unnoticed, while you're busy fending off a goon, which was the entire point of my suggestion. :P
Could this perhaps be done on top of what we already have? Does the Q3 engine allow you to do arbitrary things with incoming messages? (preferably just using macros)
Failing that, can you output all chat, or even all console output, to a log file in real-time?
If either of these is possible, it should be easy, under Linux at least, to pipe all the gubbins to festival's command-line tools...
Still not as good as native support though. ;)
-
I think it would be nice to add a feature that if someone speaks from your team, a beacon would appear above his head, that can be seen through walls and ceilings.
-
That still doesn't help if the message zips past unnoticed, while you're busy fending off a goon, which was the entire point of my suggestion. :P
Could this perhaps be done on top of what we already have? Does the Q3 engine allow you to do arbitrary things with incoming messages? (preferably just using macros)
Failing that, can you output all chat, or even all console output, to a log file in real-time?
If either of these is possible, it should be easy, under Linux at least, to pipe all the gubbins to festival's command-line tools...
Still not as good as native support though. ;)
On Windows you can launch Quake from a perl script, then parse the incomming text. I know this because theres out here a Quake1 engine for blind people that already to that, with menus and even gameplay :D
You can replace the Quake1 name by tremulous and use that file on windows. But because Windows have some SAPI (sound api) that provide the text to speech.
On Linux you will need to use festival, that will be easyer or harder. no idea.
If you really need that, I can search on my HD for this old Quake1 engine and his perl script :D
-
tremulous 2>&1 | festival --tts
This way everything happening in the console is converted to speech
so you have to use sed to only print the useful parts:
tremulous 2>&1 | sed -e <whatever> |festival --tts
I don't know how to use sed :(
Will take a look at it later.
grep is not working correctly for this because it does not seem to output the stuff directly so speech starts when i quit tremulous.
Just some sed-stuff and we'll have it :D
-
grep is not working correctly for this because it does not seem to output the stuff directly so speech starts when i quit tremulous.
Just some sed-stuff and we'll have it :D
That's probably a sound card sharing issue. Unless you are using the emu10k1 driver, two programs cannot access the OSS sound card at the same time. To solve that, you have to use a sound server and hope the Tremulous engine works with it ( ESD, ARTS ... ) or the new official way : using Jack and Alsa. Unfortunately, I'm not sure Tremulous can use Alsa itself and Jack doesn't work with the OSS emulation.
There might be other ways to do that but until it works better, my trusty SB Live will follow me from Linux computer to Linux computer, even if there is already a better sound card in it ;)
PS : yes, another way to do it is to use 2 sound cards, Tremulous will use the first and Festival can use the second :D
-
Teiman, could you post that perl script please? I couldn't work out how to get trem to output it's gubbins under windows. :(
Unfortunately (and it is my fault, really), my gaming machine only has Windows installed.
Well, I would settle for just placing the location in any "say team" message....
"[H]Stof ( Big pipe room ) : Found OM"
"[A]Stof ( Bloody room ) : new OM is building"
Am I going insane, or is this implemented - on the beta map server at least? I'm sure I saw it on the moo-moo map, or whatever it's called..?
Raumkraut: (Reactor room): <somethingorother>
[edit] I meant "meep", of course :) [/edit]
-
From what I see, it is already implemented, it's just that the official maps have no location information in them.
-
Well, how do you add location information?
-
Well, how do you add location information?
Ask that to the people who know how to do that. Like for example the meep author :)
-
Target_location people. Been there since q3 and maybe even older. Location displayed is based on proximity to closest target_location.
Key:message
Value:"enter location here"
Key:count
Value:"0-9" (color)
-
hi guys..
I saw the text to speech with festival idea and thought of giving it a try...
So I got it to work :)
The line is :
./tremulous.x86 2>&1 | sed -n -u -e 's/[a-Z~@#$%^&*()_-\ \\0-9\n\t]*: ^[0-9]/(SayText "/gp ' |sed -n -u -e 's/.*/&")/gp' |festival
(Though it can get a lot better by someone who actually knows sed)
Also festival --tts plays everything after
closing the game, because it expects an EOF (i.e ctrl-D) not an endline.
Only problem to this, is that if someone uses more than one colors in the text it says "carrot"-number. :D
-
Thanks @bio
Works great.
edit: Did you make sure the script is secure?
Someone could possibly write special signs in chat and cause a festival-command-injection?
I don't know, if there are commands which can be harmfully.
-
That's probably a sound card sharing issue. Unless you are using the emu10k1 driver, two programs cannot access the OSS sound card at the same time.
Wrong! My crappy VIA 8237 (ALC655) has (hardware) multiple streams too.
What I love about open-sourced q3... is ALSA
http://alsa.opensrc.org/index.php?page=DmixPlugin
You can enable software mixing on virtually every alsa driver without a sound server(=smaller lag most of the time).
-
Sed is just another language with ";" :P so
./tremulous.x86 2>&1 | sed -u '/\^./!d ; s/\^.//g; s/[^0-9A-Za-z]//g ; s/\(.*\)/\(SayText "\1"\)/' | festival
One sed is enough. !d kills every row besides lines with ^
s/[^0-9A-Za-z ]//g kills everything besides numbers and letters.. (so it should be safe)
-
Teiman, could you post that perl script please?
Its somewhat long, but you may download it here:
http://www.agrip.org.uk/DownloadPage
Anyway here is a edited snip of code:
# Open the pipe to our speaker program...
open( SPEECH, $config->{'win32'}->{'win32_talker'} ) or u_die "ERROR: Couldn't open \"". $config->{'win32'}->{'win32_talker'} . "\" -- please ensure you've got it set up and/or installed.\n";
# Make it the default file...
select SPEECH;
# Automatically flush the buffer to it on every print...
$| = 1;
# Which Quake program are we using?
# Why we have to use cmd /c is a mystery, but it fixes AQ for Mr. W.
$quake_prog = 'cmd /c start /b /belownormal ' . $base_path . $config->{'win32'}->{'engine'} . ' -nomouse -startwindowed +set cl_confirmquit 0';
Perl can do it. Its management of pipe from a open executable is nice enough.
The script is somewhat complex because implement some quake menus as voice commands. Seems that you can even install/uninstall mods with it.
-
Piping output of trem into festival gives this error:
Linux: can't open /dev/dsp
Maybe tremulous is already using /dev/dsp ?
-
Piping output of trem into festival gives this error:
Linux: can't open /dev/dsp
Maybe tremulous is already using /dev/dsp ?
Most likely your soundcard can't use mutiple sound streams at once - if You have ALSA try this:
http://gentoo-wiki.com/HOWTO_ALSA_sound_mixer_aka_dmix#The_dmix_device
or just google for dmix
-
There's a neat little TTS package called espeak, which can be found here: http://espeak.sourceforge.net/
I just used the same command as festival but without the "say text" bit:
tremulous 2>&1 | sed -n -u -e 's/[a-Z~@#$%^&*()_-\ \\0-9\n\t]*: ^[0-9]/("/gp ' |sed -n -u -e 's/.*/&")/gp' | speak -p 40 -s 140
The only bug with this is that espeak tells me about all the ^[number] colour sequences and non-alphanumeric symbols in people's chat binds, but sed can remove those?
I just find espeak easier to understand than festival (with the -p 40 and -s 140 options at least).
Gotta watch for spammers though else it sounds like you're having a heated argument with Stephen Hawking.