sliderool Posted June 1, 2006 Share Posted June 1, 2006 Hello all, here's an issue I'm struggling with:I'm trying to create a live text-to-speech (TTS) page in PHP.My TTS software is Cepstral for linux. It's a command line utility which works like this:[code]$ swift -n William "hello" -o hello.wav[/code]This uses the "William" voice and outputs "hello" to a wave file.I would like to create a form for a user to enter in text and press a submit button, in which the user then hears the sound. An example is on the Cepstral website main page at [a href=\"http://www.cepstral.com\" target=\"_blank\"]http://www.cepstral.com[/a] . Their setup appears to use an IFRAME and upon submission it embeds the file in the IFRAME below the textbox.Ideally, it would be resourceful to have the sound file created dynamically within a PHP script and sent to the browser for play, thus eliminating the need to create the file locally on the webserver, play it, and then delete it.Is this possible? If not, how are they doing it at cepstral.com ? Any ideas or help would be appreciated.I'm looking into the possibility of using passthru() but the command line utility only outputs to a file. Is there a way to redirect output to PHP? Quote Link to comment https://forums.phpfreaks.com/topic/10982-generating-dynamic-wav-file/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.