• TTS (Text-To-Speech) for a TTT Server
    18 replies, posted
Hey all, I've been trying to get a working Text-To-Speech for my TTT server. I've tried the Simple Text to Speech workshop addon: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=381636466&searchtext=[/url] And the other one on Facepunch: [url]http://facepunch.com/showthread.php?t=1448287[/url] However, neither of them work. The first addon has a client convar which does show up in console when I type in tts_enable (it is set to 1) which means the addon must be running. However, for both of these addons, the text to speech does not work. I really want to get this to work. Please help!
I ended up making my own text to speech as others weren't working. It works great, however I can only use it through the server console with the "say" command. For some reason it doesn't work when players try to use it. The lua file is located in lua/autorun/client Here is my code: [CODE]--snip--[/CODE] Not really sure why it doesn't work when players speak in chat. Please help!
Just use the Moonbase Alpha for the voice, there's a version by Devul and some others
You could be blocked by google's TTS, I do suggest using the one on the FP link you sent, that should work perfectly.
[QUOTE=mib999;47447159]You could be blocked by google's TTS, I do suggest using the one on the FP link you sent, that should work perfectly.[/QUOTE] someone said something about Gran PC breaking gmod peniscorp tts capability
[QUOTE=mib999;47447159]You could be blocked by google's TTS, I do suggest using the one on the FP link you sent, that should work perfectly.[/QUOTE] Yeah, I tried bitches' TTS. It didn't work for me though, It's actually just the OnPlayerChatted hook that doesn't seem to work for me, both on my TTS and yours - some kind of networking issue I think. When I did the command through the server console, I wasn't blocked by Google at all, which means that isn't the problem.
BUMP, I was never able to solve this
if the hook simply doesn't work no matter what test printing code you put inside it, some other script is breaking the hook
Yeah, I guess it could be that. The hook works when a chat message is sent through the server console, but not when it is sent by a player (tested this with a print), which is quite a strange issue.
Sounds like something might be returning a hard true/false depending on if the player is valid and they're dead, or not.
[QUOTE=TFA;47451478]Sounds like something might be returning a hard true/false depending on if the player is valid and they're dead, or not.[/QUOTE] This is not the problem. I have tested whether all the if statements are being run or not, and as I said earlier, I put a print by itself in the hook and since it is not getting printed, I know that the hook is not being run at all.
Hooks added under a function run in an order; probably the order created. If any of them return a value, no further hooks of that function run.
[QUOTE=bitches;47453215]Hooks added under a function run in an order; probably the order created. If any of them return a value, no further hooks of that function run.[/QUOTE] Sorry, you lost me. I'm trying to understand what you said but it was slightly confusingly worded :v:
let's say ten different scripts are loaded by the game engine, and each makes a hook to the OnPlayerChat hook when a player chats, the game runs each hook if for example, the sixth hook ran for OnPlayerChat gave a return value, the hooks seven to ten would not be ran
[QUOTE=bitches;47453280]let's say ten different scripts are loaded by the game engine, and each makes a hook to the OnPlayerChat hook when a player chats, the game runs each hook if for example, the sixth hook ran for OnPlayerChat gave a return value, the hooks seven to ten would not be ran[/QUOTE] Alright so I'm running a chat-tags addon which uses the OnPlayerChat hook. I'm guessing that or something similar is causing the problem. Is there any way around this issue?
fix the dumb addon that breaks it
[QUOTE=bitches;47453367]fix the dumb addon that breaks it[/QUOTE] -snip-
[QUOTE=r0uge;47453373]Well that's the thing - it works fine and has never caused any problems before or even script errors, so I don't know why it would be breaking anything or even how to fix it.[/QUOTE] He literally just told you how something is breaking it, it's probably using some type of return value in the addon, so if that addon uses a return value for the hook then the hooks that SHOULD run after, never do. [url]http://wiki.garrysmod.com/page/GM/OnPlayerChat[/url]
Alright, fixed. I couldn't remove the return as it was important to the addon, so I ended up merging the addons and making them into a single hook.
Sorry, you need to Log In to post a reply to this thread.