Author Topic: A useful purpose for Text to Speech  (Read 9256 times)

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
A useful purpose for Text to Speech
« on: February 24, 2009, 04:58:32 pm »
I am sure that this has been talked about, but I thought it would be neat to use the text to speech program that comes built into LMCE. Instead of just saying some predetermined script I want to throw a twist in there. I want to have some variables included to give me useful information in the morning. In my mind it goes something like this.
"Good morning Krys, it is 7:30 am Tuesday February 24th. The outside temperature is currently 34 degrees with an expected high of 54 and a 15% chance of rain. Dont forget that you have a 10AM meeting with the contractor, and your wifes birthday is tomorrow."

As you can see this feature would actually be of some significant value. I find myself jumping on my iphone in the morning to see what the weather will be like to dress properly or make plans. I also have a terrible memory and it would be nice to be reminded of calendar events.
The date/time info could be pulled from the system information. The weather info would need to be retrieved from some sort of weather site (not sure here) and the calendar reminder would need a calendar where we could put stuff into LMCE, a calendar on web admin came to mind.

Let me know what you guys think, or if you have already done something similar.
-Krys

wombiroller

  • Guru
  • ****
  • Posts: 340
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #1 on: February 25, 2009, 05:03:02 am »
Sounds like a pretty cool idea IMO  :)

Putting aside functionality that doesn't currently exist (calendar, weather etc) - I wonder what can currently be passed onto the Text to Speech? Security events already seem to be - is that something that is easily expanded I wonder?

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #2 on: February 25, 2009, 02:46:30 pm »
this can be done with a GSD device pretty easily. It should be trivial to write some code that uses a Zip code device data to get current day's wather from online, and possibly connect to google calendar for the current day's appointments.
The text to speech voice is terrible, however in 0710. Hopefully 0810 will use festival2 and something like this will actually be feasible.

los93sol

  • Guru
  • ****
  • Posts: 396
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #3 on: February 25, 2009, 03:02:05 pm »
I wouldn't so much call it terrible as uninterprettable.  I can never understand what it's trying to tell me, like talking to a chimp that's just learning sign language.

krys

  • Addicted
  • *
  • Posts: 583
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #4 on: February 25, 2009, 10:50:26 pm »
All the same, I would like to get this implemented so when someone does upgrade the text to speech it will already be figured out.

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #5 on: February 26, 2009, 12:19:22 am »
Does anyone know, then, whether expansion/substitution is possible in the text strings? Is it possible to intercept and preprocess command messages as well as event messages? Would this be something that would be done as a separate plugin or something within the text to speech device itself? I guess as a plugin so it has access to the other plugins as the t2s is a device....

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #6 on: February 26, 2009, 09:26:29 am »
Does anyone know, then, whether expansion/substitution is possible in the text strings? Is it possible to intercept and preprocess command messages as well as event messages? Would this be something that would be done as a separate plugin or something within the text to speech device itself? I guess as a plugin so it has access to the other plugins as the t2s is a device....
Hi,

pretty everything is possible... The problem is that currently we don't have any determined way to do such things (storing important data somewhere and then use it in speech announcements, on floorplans, etc...). BTW, I tried to replace Flite with Festival with better voices, but Flite is currently hardcoded... Also there is a nasty bug when you make speech announcement while playing playlist - my system goes mad in majority of cases... Also sometimes empty rectangles accumulate on media floorplan if there are many announcements...

I've compiled Festival based on this source :
http://ubuntu-ky.ubuntuforums.org/showthread.php?t=751169

I'd recommend to start enhancing Text to speech plugin by option of using better Festival voices, then some sort of data storage and then rework speech announcements... I think that idea is right, users would love to have system talking about events in the house and other gathered data - but currently this feature is pretty limited...

Regards,

Bulek.
« Last Edit: February 26, 2009, 09:31:40 am by bulek »
Thanks in advance,

regards,

Bulek.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: A useful purpose for Text to Speech
« Reply #7 on: February 26, 2009, 09:51:32 am »
I'd recommend to start enhancing Text to speech plugin by option of using better Festival voices, then some sort of data storage and then rework speech announcements... I think that idea is right, users would love to have system talking about events in the house and other gathered data - but currently this feature is pretty limited...

bulek,

please put a working patch into trac. We will be glad to incorporate it into 0810 ;)

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #8 on: February 26, 2009, 11:52:43 am »
I'd recommend to start enhancing Text to speech plugin by option of using better Festival voices, then some sort of data storage and then rework speech announcements... I think that idea is right, users would love to have system talking about events in the house and other gathered data - but currently this feature is pretty limited...

bulek,

please put a working patch into trac. We will be glad to incorporate it into 0810 ;)

Or at the very least document your efforts somewhere.
"Change is inevitable. Progress is optional."
-- Anonymous


jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #9 on: February 26, 2009, 07:38:06 pm »
The text to speech plugin is fine. It does what it is supposed to do - that is turn text into speech. Sure, it needs upgraded to festival2 with better voices, but that is a separate issue.

Any pre-processing of the text string should happen in the device that calls text to speech. For example, make an "Announcement" device, and give it a devicedata for zipcode (for weather info retreival), and a devicedata for a custom text string. Then, pre-define some tags that will be replaced with text, such as:
<current_time>,<current_temp>,<user_logged_in>,<current_date>,<current_day>, etc. In Ruby, using GSD, have these pieces of data fetched from the web or from the system. Then replace the above tags with that data, so in the end, you have a text string to pass to text_to_speech. For example, the custom string device data may look like:
"Good morning <user_logged_in>. It is currently <current_time> on <current_day>, and it is <current_temp> degrees outside." etc...

You get the point. Done this way, and with many supported "tags", anyone could have a custom announcement just by changing the device data.

Basically, the building of the text string for text_to_speech should happen in the device that needs to use it. There isn't a need to clutter the text_to_speech plugin with code that doesn't belong there.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #10 on: February 26, 2009, 09:32:03 pm »
We need to re-work the Media Plugin as well, to honor the Resume boolean, so that things can be injected and then when done, the existing media will continue.

Will somebody please help me with this?

-Thom

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #11 on: February 26, 2009, 10:00:09 pm »
We need to re-work the Media Plugin as well, to honor the Resume boolean, so that things can be injected and then when done, the existing media will continue.

Will somebody please help me with this?

-Thom

Thom - is it possible, also, to have the speech not display the playlist UI with a wav file in it? Looks kinda ugly :)

Steve

  • Veteran
  • ***
  • Posts: 67
  • 16 Years Linux exp.
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #12 on: February 27, 2009, 12:56:13 am »
That is a very cool idea and is possible. Home Seer has it builtin. oops!, thats on a windows machine
Hybrid core Gigabyte GA-EP45-UD3R m/b 2.8Ghz 2 gig ram. HVR1600 on the core. 2 Orbiter on Android for control 1 phone the other tablet. Running 10.04

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: A useful purpose for Text to Speech
« Reply #13 on: February 27, 2009, 03:06:33 am »
We need to re-work the Media Plugin as well, to honor the Resume boolean, so that things can be injected and then when done, the existing media will continue.

Will somebody please help me with this?

-Thom

Thom - is it possible, also, to have the speech not display the playlist UI with a wav file in it? Looks kinda ugly :)

Some time ago I discussed this with Aaron. At that time I think Xine player was not using Alsa and more apps couldn't get to the sound card. I proposed to make speech announcements silently (with aplay or similar), but this has pros and cons... But because of OSS limitation it has to interrupt(stop) current play and then resume it, while now we could maybe pause (fade to silent), do announcement and then start from pause with fading again...

There is also a problem, cause multiple speech announcements are not properly handled (in my case count down for alarm is rarely heard properly - parts of speech are missing, etc...).

Also one proposition for additional pause or somekind of announcement audio signal to be prepended. if you have 2 secs of delay in switching on and preparing amp for operation, then you can miss beggining of announcement...

Regards,

Bulek.
Thanks in advance,

regards,

Bulek.