D-Bot/plugins/tts.php

8 lines
329 B
PHP
Raw Normal View History

2015-05-29 11:20:55 -05:00
<?php
2015-06-30 02:05:22 -05:00
PluginSet("tts", "Text To Speech");
$mp3 = file_get_contents("http://tts.baidu.com/text2audio?lan=zh&ie=UTF-8&text=".urlencode($plugin_text));
2015-06-26 01:14:14 -05:00
$file = fopen($from.".mp3","w");
2015-05-29 11:20:55 -05:00
echo fwrite($file,$mp3);
fclose($file);
2015-06-26 01:14:14 -05:00
$BOT->send_audio($from, "/home/wwwroot/1.vps.dennx.com/".$from.".mp3");
2015-06-30 02:05:22 -05:00
//unlink($matches[1].".mp3");