mirror of
https://github.com/sr229/metastruct-experiments.git
synced 2024-09-20 06:30:36 +00:00
Add Gimpy's version
This commit is contained in:
parent
83c9f750f5
commit
0e8fd1c086
1 changed files with 20 additions and 0 deletions
20
starfallex/starfall_tts_gimpy.lua
Normal file
20
starfallex/starfall_tts_gimpy.lua
Normal file
|
@ -0,0 +1,20 @@
|
|||
--@name GimpyTTS
|
||||
--@author Mavain and Minori
|
||||
--@client
|
||||
|
||||
local lang = "en"
|
||||
local soundref
|
||||
|
||||
hook.add("playerchat", "fucke2", function(ply, txt)
|
||||
if ply ~= owner() then return end
|
||||
|
||||
bass.loadURL("https://translate.google.com/translate_tts?ie=UTF-8&q=" .. txt .. "&tl=" .. lang .. "&client=tw-ob", "3d",
|
||||
function(a, err, name)
|
||||
-- we dispose the current reference, then we create a new one
|
||||
if soundref then soundref:stop() end
|
||||
soundref = a
|
||||
|
||||
hook.add("think", "soundFollow", function() a:setPos(owner():getPos()) end)
|
||||
a:play()
|
||||
end)
|
||||
end)
|
Loading…
Reference in a new issue