Commit | Line | Data |
---|---|---|
f9138ad7 H |
1 | <title>Harvie's Remote TTS</title> |
2 | <link rel="stylesheet" type="text/css" href="admin.css"> | |
3 | ||
4 | <form action="?" method="GET"> | |
5 | <input type="text" name="tts"> | |
6 | <input type="password" name="pwd" value="<?php echo($_GET['pwd']); ?>"> | |
7 | <input type="submit" value="ODESLAT!"> | |
8 | </form> | |
9 | ||
10 | <?php | |
11 | $passwd='posli'; | |
12 | if($_GET['pwd'] != $passwd) die('<br />Wrong password!'); | |
13 | $text=$_GET['tts']; | |
14 | echo("?tts=$text"); | |
15 | ||
16 | function festival_say($text, $encoding='UTF-8') { | |
17 | //Maybe you will need to SUID festival binary... | |
18 | $festival = popen("iconv -c -t ISO-8859-2 -f $encoding | festival --tts", 'w'); | |
19 | fwrite($festival, $text); | |
20 | fclose($festival); | |
21 | } | |
22 | ||
23 | festival_say($text); | |
24 | ||
25 | ||
26 | ||
27 |