[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
#2

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
Reply
#3

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.
Reply
#4

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

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
Reply
#6

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"
Reply
#7

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? -.-
Reply
#8

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
Reply
#9

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.
Reply
#10

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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)