Idea - 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: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: Idea (
/showthread.php?tid=611825)
Idea -
K0P - 11.07.2016
Hi,i got an idea of an include which i want to make,i just wana ask that is this possible to make an include which enables to play voice messages for players.
For example i made this function: PlayVoiceMessageForPlayer(playerid, message[]);
And i use it like this : PlayVoiceMessageForPlayer(playerid, "Hi im K0P");
And it will speak this message for the player.
Also,is this possible to loop through all the spoken word's sound files (The files will be named according to the word spoken in the file) and find a matching word from the message[] string.Then play the word file?
Re: Idea -
Arastair - 11.07.2016
-EDITED- It is possible, pretty good idea
Re: Idea -
vikoo - 11.07.2016
GOOD IDEA but idk if it will be success or not
Re: Idea -
K0P - 11.07.2016
Quote:
Originally Posted by [HLF]Southclaw
Very possible!
https://pypi.python.org/pypi/gTTS + https://sampwiki.blast.hk/wiki/PlayAudioStreamForPlayer
You'd either have to write a C++ plugin to do the TTS part, use the exec plugin to run a Python script that uses gTTS or wait for Pawpy to be linux-ready. Then it's just a case of generating an .mp3 of the text-to-speech and returning the filename back to Pawn once it's ready so it can be played with PlayAudioStreamForPlayer (of course you'd need a webserver running on the machine too so the file can be served to players).
|
Thanks!
Ill do some research on that method as im new to all that stuff (Making plugin,TTS,Pawpy,exec)