Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Unable to play sounds using FreeTTS

 
Ranch Hand
Posts: 153
2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am trying to execute the fallowing code.
If i execute the code as a normal java application (using main method) its working fine.


But when i am calling this code from a servlet which is deployed in Tomcat6


getting exception

.
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Umm, you're trying to make a server make sounds? Who could possibly hear those?
 
Saloon Keeper
Posts: 25470
180
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Ulf means is that this is code that's designed to output speech from the audio hardware of some server locked in a room in a datacenter somewhere and the server probably doesn't even have loudspeakers attached to it.

In order for a web application to be able to produce synthesized speech that can be heard by the web user, the generated audio needs to be piped to the web user's (client) computer, where the user's audio hardware can play it. Assuming that THEY have attached loudspeakers (or at least something like headphones).

Since web HTTP protocols don't support that, what you're going to need to do is basically the same thing you'd do if the web application was generating PDF's or graphics - create a temporary file with the data in it and attach it to a URL that the client would then request in order to get the audio data and play it.

There should be options for TTS output in wav, ogg, and/or mp3 formats (among others), so you need to read up on that part of the package.
 
Fire me boy! Cool, soothing, shameless self promotion:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic