moved libpurple-answerscripts to separate repository. wow!
[mirrors/Programs.git] / php / speech.php
CommitLineData
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';
12if($_GET['pwd'] != $passwd) die('<br />Wrong password!');
13$text=$_GET['tts'];
14echo("?tts=$text");
15
16function 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
23festival_say($text);
24
25
26
27
This page took 0.249598 seconds and 4 git commands to generate.