New version that doesn't freeze.
[url=http://www.garrysmod.org/downloads/?a=view&id=65758][img]http://www.garrysmod.org/img/?t=dll&id=65758[/img][/url]
It doesn't say anything on startup either.
edit:
There is a better way to thread this than what I am doing, I'll probably do that later if I work more on this.
Not entirely sure if its just me but im not getting any output with this. is anyone else having the problem?
1.3 is working perfectly for me.
Too bad this can't be streamed from the server to the clients, so much use could come out of this.
load 'n' her up now, i'll post with results :D
There is no download link. :(
Put up a working download that isn't from garrysmod.org.
What dumb garrysmod.org moderator would seriously keep removing this?
Are you putting them in zip files?
Yes, they've all been in zip files.
[U][highlight]VERSION 1.4[/highlight][/U]
[url]http://upl.luahelp.com/uploads/z9PsXcxb/gSpeak%201.4.zip[/url]
No new features, just fixed some issues before people would start noticing them. It now only uses a max of one thread for speaking, instead of one thread per gspeak.Say call (which remains until the message has been spoken).
This means that you could now do:
[lua]
for counter = 1, 9001 do
gspeak.Say(tostring(counter))
end
[/lua]
Without creating 9001 threads. It now queues messages instead and keeps one thread alive when the queue is not empty.
When you use this module and leave the game then comes to a crash. :(
Can you fix this 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.
[QUOTE=Grocel;14478628]When you use this module and leave the game then comes to a crash. :(
Can you fix this please? :)[/QUOTE]
I find that it just crashes then and there.
[QUOTE=Grocel;14480263]When the voice is speaking and you disconnect from server or end the game, then the game crash.[/QUOTE]
Good point.
Let me fix that.
[QUOTE=Bobsymalone;14480474]I find that it just crashes then and there.[/QUOTE]
Hm?
fixed:
[code]
] lua_run_cl require "speak"
] lua_run_cl gspeak.Say(string.rep("Hello! ", 10))
Dropped jA_cOp from server (Disconnect by user.)
[/code]
No crash. Stops the thread and releases any resources it might have left unprocessed.
[url]http://upl.luahelp.com/uploads/glxqA4lk/gSpeak%201.5.zip[/url]
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,
[lua]gspeak.Say(("Hello!"):rep(10), 100)[/lua]
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:
[code]
C:\program files\Steam\steamapps\username\garrysmod\garrysmod\lua\includes\modules
[/code]
then restarted my gmod, clicked on play singleplayer, and put this in console:
[code]
lua_openscript speak.lua
lua_openscript_cl speak.lua
[/code]
and the speak.lua file looks very similar to the one in the first post:
[lua]
require("speak")
local function textchat( ply, text, toall)
gspeak.Say(text)
ply:ChatPrint( text )
end
hook.Add( "PlayerSay", "TextChat", textchat )
[/lua]
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.
[url]http://upl.luahelp.com/uploads/zIxGNQoA/gSpeak%201.6.zip[/url]
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:
[lua]require("speak")
concommand.Add("speak", function(ply, cmd, args)
print(gSpeak.IsSpeaking())
gspeak.Say("Blah no see way gid")
end)[/lua]
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.
[lua]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")[/lua]
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.
[hd]http://www.youtube.com/watch?v=cfxIQ9bp82w&fmt=22&hd=1[/hd]
Lua Script Used:
[lua]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)[/lua]
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.
Sorry, you need to Log In to post a reply to this thread.