Leave the game? Disconnecting from a server works fine for me, and so does exiting the game itself.
Describe your problem some more, please.
Leave the game? Disconnecting from a server works fine for me, and so does exiting the game itself.
Describe your problem some more, please.
When the voice is speaking and you disconnect from server or end the game, then the game crash.
I find that it just crashes then and there.
Good point.
Let me fix that.
Hm?
fixed:
No crash. Stops the thread and releases any resources it might have left unprocessed.Code:] lua_run_cl require "speak" ] lua_run_cl gspeak.Say(string.rep("Hello! ", 10)) Dropped jA_cOp from server (Disconnect by user.)
http://upl.luahelp.com/uploads/glxqA...peak%201.5.zip
Possible to get voice changing in this?
Also great job on it so far! I loved the text to speech in UT and have been dying for it in other games.
I just made a simple test and renamed Sandbox to Tetris and made it say "Lets play some Tetris mother fucker" when you spawn :D
I have no idea why, but it seems not to play any sounds for me.
I required the module, the table gspeak exists and MS-Sam is preselected on my XP (SP3 + latest patches).
I also renamed gm_speak -> gmcl_speak since I only want to have the module on clside available. But that's not the problem.
Is Microsoft Sam working for you in the Windows test input box in its control panel entry?
Try overriding the default volume by specifying a second argument like so,
gspeak.Say(("Hello!"):rep(10), 100)
Ms. Sam works for me over the controlpanel and I already tried using different volumes without any results.
Can you add a gspeak.IsSpeaking function, please.
I've managed to use my Stereo Mix device to make it so people can go:
"Dico, say OMG CHEESE"
And the TTS will say "oh em gee cheese" over the microphone
But I have to do +voicerecord constantly.
Epic module, thanks for making it.
That's a good idea, I'll make it once I get my laptop back from repairs, that's where I have all the stuff I need to develop.
Here's what I did. I downloded this rar file, extracted on desktop, copied the file named gm_speak.dll and put it in:
then restarted my gmod, clicked on play singleplayer, and put this in console:Code:C:\program files\Steam\steamapps\username\garrysmod\garrysmod\lua\includes\modules
and the speak.lua file looks very similar to the one in the first post:Code:lua_openscript speak.lua lua_openscript_cl speak.lua
require("speak") local function textchat( ply, text, toall) gspeak.Say(text) ply:ChatPrint( text ) end hook.Add( "PlayerSay", "TextChat", textchat )
When I type something in chat, my gmod crashes.
Made a quick update adding two functions; gspeak.IsSpeaking and gspeak.QueueSize. The former should be fairly self-explanatory, the latter returns the amount of messages that are waiting to be spoken, including the one currently being spoken.
http://upl.luahelp.com/uploads/zIxGN...peak%201.6.zip
Sorry that this took so long, I totally forgot about this module.
The sounds never play for me, the QueueSize function works correctly, but IsSpeaking always returns true. It's quite odd and I do have MS Sam selected as default in speech.
Hm, I only ever tested this with MS Anna. Has MS Sam worked for anyone?
For some reason, this isn't working at all. I have MS Mike selected as the default voice, and my code is as follows:
require("speak") concommand.Add("speak", function(ply, cmd, args) print(gSpeak.IsSpeaking()) gspeak.Say("Blah no see way gid") end)
I of course have the latest module in lua/includes/modules or something like that. I don't hear anything, but get no errors, and nothing prints in the print(gSpeak.IsSpeaking()) at all. Anyone know why this is? I would really like to use this.
Well - is the code actually run? Put a print after the call to require. gSpeak.IsSpeaking always returns a boolean value, so if the console command really was registered there is no way running it won't print anything.
require("speak") concommand.Add("speak", function(ply, cmd, args) print(gSpeak.IsSpeaking()) gspeak.Say("Blah no see way gid", 100, 0) end) print("tts loaded")
Yes, it prints tts loaded right after it says Lua 5.1 initialized or whatever. And still, print(gSpeak.IsSpeaking()) is nothing. The sound is all the way up and I can hear game sounds fine.
It seems that the problem is with "speak". Use another name for the console command.
Alright, I decided to make a sample video using gSpeak 1.6 showing that "speak" isn't the only problem.
Lua Script Used:
require("speak") concommand.Add("gspeak", function(ply, command, args) if #args == 0 then print("Usage: gspeak <message>") return end for k,arg in pairs(args) do string.Replace(arg, "\"", "") string.Replace(arg, "'", "") end gspeak.Say(table.concat(args), 100) end) concommand.Add("gspeak_isspeaking", function(ply, command, args) print(gspeak.IsSpeaking()) end) concommand.Add("gspeak_queuesize", function(ply, command, args) print(gspeak.QueueSize()) end)
I placed this in autorun/client/gspeak.lua
Also, sorry for the annoying birds in the background lol.
I do have a theory as to why it isn't working with Microsoft Sam. You see, since Anna and Sam are on different SAPI engines, I figure that the module isn't accessing the version of SAPI that Sam is on correctly and thus, no sound occurs. This also worked for d3cr1pt0r with the same script that I used who is running on Windows 7.
Damn, can someone upload this again please? Thanks.
I just released a new version, including gspeak.Pause and gspeak.Resume. More information and download in the first post.
I can't test with anything but Microsoft Anna on Windows Vista - that's the only thing I have :(
You can try compiling the module on your system, and see if that works. Here are the project files (Visual Studio C++ 2008):
http://upl.luahelp.com/uploads/dKdVI...ct%201.6.1.zip
Since ATL is was not included in the newest Microsoft SDK (you need the professional version of VS), the project depends on both the newest Microsoft SDK and the one from 2006. The paths are:
And:Code:C:\Program Files\Microsoft Platform SDKs 2006\Include\atl
(If you already have Microsoft SDK installed you can change these paths in the project settings)Code:C:\Program Files\Microsoft SDKs\Windows\v6.1\Lib
Alternatively; if you don't want to compile the project, I can try compiling it with your sapi.lib. Just grab whichever Microsoft SDK version you think might work with MS Sam, upload its sapi.lib and PM me the link and I'll compile it for you.
The download should be working again now.
edit:
Released 1.6.2. I fucked up with gspeak.IsSpeaking in 1.6.1 (thanks n00berific!).
Im going to try to compile, i'm using xp and I want to use this ;/
Edited:
I have Visual Studio C++ 2008 installed but I can't find where to download the microsoft SDK?
so does this still work?
Yeah, I don't see a dl link except for the source.
What? It's right there at the end of the first post. There's no special download for the source, the only download has both the DLL and the source.
Oh, I was looking for a yellow box. That was stupid.
Someone else should try to compile using xp. I would like to use this. :(
Yeah, it still doesn't work for me.
Dead broken links on my end. Re-upload to another mirror?
Does anyone have a latest link?
Added filesmelt mirror to the first post.
This never worked for me :/
Windows XP Professional
It never worked for me on XP too, but does on W7 now. I think, the MS-Speech Api is just different in XP.
Also: Is there a way in not having the sound of gspeak only on my center-speaker? I know, it's something "new" in Windows 7 but it's annoying (even voice-chat is only in the center-speaker).
-snip-
Please Re-Upload...
Its broken anyways
Id love to see this work, and i know that this is a dead post (might not be) But the dl links are all broken (file removed) and i cant find anything else like this, so plz get the links up?
You could use gm_fonixtalk:
http://mattmodules.googlecode.com/sv...xtalk/Release/