Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- hell yeah
- -- here is your working dectalk text to speech generator for gmod
- -- By lenn
- -- clientside version not serverside
- timer.Simple(5, function()
- chat.AddText("[libby]: dectalk tts command and system loading")
- hook.Add("OnPlayerChat", "libre_textstospeech", function(v, text, team)
- if string.find(string.lower(text), "/tts") then
- if text[1] == "/" then
- local me = LocalPlayer()
- if v == me then
- print("received message")
- -- translate people who say stuff in korean
- chat.AddText("TTS (Text to speech) is enabled, you may disable it by typing /disabletts in chat")
- timer.Create("wtfmomentlaunch", 0.1, 1, function()
- hook.Add("OnPlayerChat","libre_woahtextspeech", function(player, text, team, dead)
- -- here u go your very nice dectalk text to speech generator
- -- not from porchlight
- sound.PlayURL("http://tts.cyzon.us/tts?text="..text.."", "mono noblock noplay", function(station)
- if ( IsValid( station ) ) then
- ClientStation = station
- station:Play()
- station:SetVolume( 2.1 )
- end
- end)
- end)
- end)
- else
- end
- end
- end
- end)
- hook.Add("OnPlayerChat", "libre_disabletextspeech", function(v, text, team)
- if string.find(string.lower(text), "/disabletts") then
- if text[1] == "/" then
- local me = LocalPlayer()
- if v == me then
- print("received message")
- chat.AddText("TTS (Text to speech) is disabled, you may enable it by typing /tts in chat again")
- timer.Create("wtfmomentlaunch", 0.1, 1, function()
- hook.Remove("OnPlayerChat","libre_woahtextspeech")
- end)
- else
- end
- end
- end
- end)
- chat.AddText("[libby]: dectalk tts command and system loaded")
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement