SA-MP Forums Archive
[Tool/Web/Other] [STOCK] Text To Speech - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Filterscripts (https://sampforum.blast.hk/forumdisplay.php?fid=17)
+--- Thread: [Tool/Web/Other] [STOCK] Text To Speech (/showthread.php?tid=168487)



[STOCK] Text To Speech - Mike Garber - 16.08.2010

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)


Re: [STOCK] Text To Speech - gamer931215 - 16.08.2010

lol, than this actually speech the text what someone is pm-ing ?
nice, didnt knew anyways that you can use website URL's too in pawn


Re: [STOCK] Text To Speech - Mike Garber - 16.08.2010

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
lol, than this actually speech the text what someone is pm-ing ?
nice, didnt knew anyways that you can use website URL's too in pawn
No, that was an example how to use strings to speech. You can use it for ANY text.

pawn Код:
TextToSpeech(playerid,"ANY TEXT IN HERE LMFAO OMG LOL");
Will make the lady say "ANY TEXT IN HERE L M F A O O M G L O L"); (since she can't say LMFAO OMG LOL)

You will need the audio plugin, and players will need the audio client installed.


Re: [STOCK] Text To Speech - gamer931215 - 16.08.2010

Yes i understand, simple function but never saw it before. Nice !


Re: [STOCK] Text To Speech - Mike Garber - 16.08.2010

Quote:
Originally Posted by gamer931215
Посмотреть сообщение
Yes i understand, simple function but never saw it before. Nice !
:P Because It was never made & released before :P

Fj0rtisFredde made It for his project, and I saw the code in my head and made It xD


Re: [STOCK] Text To Speech - Mike Garber - 16.08.2010

Quote:
Originally Posted by ******
Посмотреть сообщение
RyDeR` beat you to this by a long time:

https://sampforum.blast.hk/showthread.php?tid=166348
LOL I never saw that xD
Never tested It either, but I'm sure It works.

This is easier to apply & use. "Plug'nPlay style"


Re: [STOCK] Text To Speech - Fj0rtizFredde - 16.08.2010

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
Idea by FjortizFredde but he takes a long time soo....
What do you mean by this? Only beacuse I want my code to be used at my server to make it more uniqe does that mean that I have to share my code? -.-


Re: [STOCK] Text To Speech - Mike Garber - 16.08.2010

Quote:
Originally Posted by Fj0rtizFredde
Посмотреть сообщение
What do you mean by this? Only beacuse I want my code to be used at my server to make it more uniqe does that mean that I have to share my code? -.-
I thought you would release It first but after some reading I understood you wouldn't.
:P


Re: [STOCK] Text To Speech - RyDeR` - 16.08.2010

What's your point?

https://sampforum.blast.hk/showthread.php?tid=166348

EDIT: Whoops, didn't see the post of ******, thanks man ^^

Quote:
Originally Posted by Mike Garber
Посмотреть сообщение
LOL I never saw that xD
Never tested It either, but I'm sure It works.
Don't tell me you didn't see this. It was on the first page for days.


Re: [STOCK] Text To Speech - Toni - 16.08.2010

Quote:
Originally Posted by RyDeR`
Посмотреть сообщение
What's your point?

https://sampforum.blast.hk/showthread.php?tid=166348

EDIT: Whoops, didn't see the post of ******, thanks man ^^



Don't tell me you didn't see this. It was on the first page for days.
It was, + this is pretty much the same thing as yours, he had the same exactly ****** link.

Also, this can't switch languages like RyDeR`'s can.