Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 1

AWS Integração polly

exten=>_091,1,Answer()
same=>n,Set(voicercode=en-us)
same=>n,Set(__translated="Hello world")
same=>n,system(php /var/www/html/tts/voicerss1.php "${translated}" ${UNIQUEID} "$
{voicercode}")
same=>n,Playback(/var/www/html/tts/${UNIQUEID})

php voicerss1.php code

<?php
//en-us fr-fr es-es es-mx
$message=rawurlencode($argv[1]); //convert spaces if not wont work
$api="000000001110119";
$lang="en-us";
$type="WAV";
$format="8khz_16bit_mono";
$name=$argv[2];
$url=shell_exec(" curl -o /var/www/html/tts/$name.wav -G
-d\"key=$api&hl=$lang&c=$type&f=$format&src=$message\" http://api.voicerss.org");
echo $url;

?>

exten => 6656,1,NoOp()


same => n,Answer()
same => n,playback(greet)
same => n,Set(foo=${CURL(http://api.voicerss.org/?
key=1d7239b16807498889cb40989d871498&hl=en-us&src=Hello 16, world!)})
same => n,Hangup()

will it work…it gave me return ID3

You might also like