Atozed Forums
Microsoft Text to Speech - Printable Version

+- Atozed Forums (
+-- Forum: Atozed Software Products (
+--- Forum: IntraWeb (
+---- Forum: English (
+----- Forum: IntraWeb General Discussion (
+----- Thread: Microsoft Text to Speech (/thread-2237.html)

Microsoft Text to Speech - wmyhal - 01-13-2021


Recently I wrote a Delphi app to would read text an play it to the speakers. (Text to speech)

I am wondering if it's possible to do this using intraweb?

RE: Microsoft Text to Speech - rlebeau - 01-13-2021

I'm not an IntraWeb dev/user, but my gut instinct is to say no, since IntraWeb is a web-based client/server system. What are you trying to accomplish exactly? Are you wanting the server to produce text that a client webbrowser then reads audibly? You would need a TTS engine installed on the client that is accessible via client-side web scripting. Or, you could install a TTS engine on the server side that can render its speech output to a WAV/MP3 file, and then serve that file to a client webbrowser to play. Either way, I think this is out of the scope of IntraWeb itself.

RE: Microsoft Text to Speech - DanBarclay - 01-14-2021

The answer, of course, is "yes". Most questions of "possible" on anything will be "yes". But, the real question is whether it would behave the way you want it to behave.

Bad plan A: doing the conversion on the server (not a good plan for server loading)
1. IW can accept your text and pass it to the server.
2. Your Delphi server code can take the text and call your Delphi code to create audio output.
3. IW can send the audio file/stream to the browser, where it can be played.

However, with this kind of cycle you will likely have delays and loading issues (particularly if a lot of users are trying to do it at once).

Worse plan B: There have also been mechanisms in browsers that allow you to run "local" apps/code from the browsers. That is, you make the browser call your delphi code, running on the user's machine, and convert text to audio. Those should be used with care and you should assume that the browser will eventually break it with security rules (it is inherently not secure). Worse, every browser has a different mechanism to do that. The good news is that this plan results in very little load on the server.

So, the question of "possible" is "yes". However, I'm guessing there is some other way (using built in accessibility resources rather than Delphi code) to convert text to audio. But, that's just a guess.