4 Copyright(c)2008-2010 Internet Archive. Software license AGPL version 3.
6 This file is part of BookReader.
8 BookReader is free software: you can redistribute it and/or modify
9 it under the terms of the GNU Affero General Public License as published by
10 the Free Software Foundation, either version 3 of the License, or
11 (at your option) any later version.
13 BookReader is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU Affero General Public License for more details.
18 You should have received a copy of the GNU Affero General Public License
19 along with BookReader. If not, see <http://www.gnu.org/licenses/>.
21 The BookReader source is hosted at http://github.com/openlibrary/bookreader/
25 if ('.ogg' == $_GET['format']) {
29 $cmd = 'echo ' . escapeshellarg($_GET['string']);
30 $cmd .= ' | /petabox/sw/bin/text2wave';
32 header('Content-Type: audio/mpeg');
33 $cmd .= ' |ffmpeg -i - -f mp3 -';
35 header('Content-Type: application/ogg');
36 $cmd .= ' |oggenc --quiet -';