[Tool/Web/Other] [STOCK] Text To Speech
#1

Idea by FjortizFredde but he takes a long time soo....
pawn Код:
stock TextToSpeech(playerid,text[])
{
    new url[256];
    format(url, sizeof(url), "http://translate.******.com/translate_tts?tl=en&q=%s",text);
    Audio_PlayStreamed(playerid,url,false,false,false);
    return 1;
}
Put this anywhere in your script.

Now to use this, simply use

pawn Код:
TextToSpeech(playerid,"THE TEXT YOU WANT");
Now, as with any other stock function you have to figure out on your own how to use It
further, but It can also be used with strings etc, just like any function.

pawn Код:
// JUST AN EXAMPLE

new string[128];
format(string, sizeof(string), "PM from %s says %s",sendername,pmtext);
TextToSpeech(receiverid,string);
OBS! You need this for It to work, and #include It in your gamemode!
https://sampforum.blast.hk/showthread.php?tid=82162
(Audio Plugin)
Reply


Messages In This Thread
[STOCK] Text To Speech - by Mike Garber - 16.08.2010, 13:45
Re: [STOCK] Text To Speech - by gamer931215 - 16.08.2010, 13:50
Re: [STOCK] Text To Speech - by Mike Garber - 16.08.2010, 13:52
Re: [STOCK] Text To Speech - by gamer931215 - 16.08.2010, 14:10
Re: [STOCK] Text To Speech - by Mike Garber - 16.08.2010, 14:14
Re: [STOCK] Text To Speech - by Mike Garber - 16.08.2010, 14:16
Re: [STOCK] Text To Speech - by Fj0rtizFredde - 16.08.2010, 14:25
Re: [STOCK] Text To Speech - by Mike Garber - 16.08.2010, 14:27
Re: [STOCK] Text To Speech - by RyDeR` - 16.08.2010, 15:05
Re: [STOCK] Text To Speech - by Toni - 16.08.2010, 15:21

Forum Jump:


Users browsing this thread: 1 Guest(s)