Text to speech in IIS

Some customers want to convert text to audio in web sites with Active TTS. They may use ASP, ASP.Net as program languages and use IIS as the web server.

If they query the voice installed on the system in such script languages, they will find there are only SAPI4 voices listed. The reason behind it is that SAPI5 voices needs more privilege than the normal IIS user account. IIS has its special account management. It is possible to set the account in IIS to use SAPI5 voices. You can refer to html to image in IIS for some ideas. But here I am suggesting an alternative way.

We have provided a TTSService demo in the trial version of Active TTS. It is a win32 service program. The work flow is:

1. TTS Service is started when windows starts. It runs at background with a SYSTEM or administrator account.  It listens to a private port for local HTTP connection.

2. In ASP or ASP.Net, handle the http request from web user. Compose the text that is to be converted to audio. Save the text to a local disk file. Send the text file name and the audio file name in a HTTP request to the port TTS Services listens to.

3. TTS Service reads the file name and converts the text into audio with the help of Active TTS object. The audio will be saved into the audio file name embedded in the HTTP request.

4. ASP or ASP.Net send response to the web user to tell the conversion is completed.

We can provide TTSService source codes to those who are interested. It is written in Delphi. For those who don’t program in Delphi, it is still useful to refer to it for understanding the ideas.

 

eee.jpg