Today with Google Translate, found a good thing: Google Translate_tts, call this API can hear English pronunciation,
Saves yourself the hassle of uploading audio files.
I used PHP to write a call method, you can save the audio file locally.
as follows:
Copy CodeThe code is as follows:
$newfname = ' 1.wmv ';
$reqBaseURL = ' Http://translate.google.com/translate_tts?tl=en&q=how%20do%20you%20do ';
$remote _file = fopen ($reqBaseURL, "RB");
if ($remote _file) {
$NEWF = fopen ($newfname, "WB");
if ($NEWF) {
while (!feof ($remote _file)) {
Fwrite ($NEWF, Fread ($remote _file, 1024 * 8), 1024 * 8);
}
}
}
if ($remote _file) {
Fclose ($remote _file);
}
if ($NEWF) {
Fclose ($NEWF);
}
http://www.bkjia.com/PHPjc/328136.html www.bkjia.com true http://www.bkjia.com/PHPjc/328136.html techarticle today with Google Translate, found a good thing: Google Translate_tts, call this API can hear English pronunciation, eliminating the hassle of uploading audio files. I wrote a tune in PHP ...