Author Topic: Collaborator Wanted: Verbal Announcements  (Read 1116 times)

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Collaborator Wanted: Verbal Announcements
« on: September 01, 2012, 04:35:19 pm »
I have reached a point where I almost have status updates ready to be announced verbally by LMCE. 

Instead of my wake-up event saying "Good Morning, Jeremy", I am working on getting "Good Morning Jeremy, it is Saturday, September 01.  Outside temperature is 80 high today is 86."

I would like climate section orbiter scenes that when pressed state "current temperature is 81, wind speed 5 from southwest, no active alerts"

1001 other ideas I could type here, but I have an issue and need some help from another user to get this working.

What I have =
Several small scripts that can pull current conditions either from the internet for weather, yahoo headlines, etc.  I also have scripts that can pull information from local resources such as state, current time/date or other background programs.  This information is pulled and written to a temp text file.  From command line I can run these scripts and have festival or espeak read back the text file in the format I want to hear it in.  My current work is trying to combine these into one large script that depending on what conditions are used will output different information.  Because the text to be read is pulled from one reused text file everything stays clean and there is no need to add a rm line.

Roadblock =
Text to Speech template in LMCE only accepts 'quoted' statements.  There is no way to get a path/to/file.txt into the event/statement area. 

What I need =
Someone good with web-admin/template creation to rewrite or create a new Text to Speech template that accepts path.  The command to run my scripts can exist in the event so this new template does not need to include 'run script', in fact it would be best left with path to text so that it stays clean.  Moving statements from other existing events to path would be easy.  Create a location called ~/spoken that can house all the tts statements as separate .txt files, my constantly updated current_conditions.txt will be just one of them.

How to collaborate=
Your template to me: via instructions to create.  I do not believe anything will need to be written to make a template capable of reading from a path so just explain how you created it.  If there are issues that require you to write something then we can use sharing methods described below.

My scripts to you:  A few of these require adding weather-utils which is in the repository so there is nothing special other than an apt-get install needed.  My scripts are really simple bash commands made executable.  They can be sent as text via email, personal message etc.  When you get them of course look them over to see what I am calling and how I am filtering content to be spoken.  Once you know I didn't just doomsday you, you execute a gcc command to compile and another command (sorry I forget atm) to make it executable. 

When it is clean and we are satisfied I will get permission to upload to sqlCVS and others will be able to use this function as well.  Pat yourself on the back at this point and call yourself a semi-dev!  Honestly I get frustrated with 'almost' getting things working under LMCE and think this is a good way to use what I know so far without several more weeks of template/GSD research. 

Message me if you are interested in helping and be sure to include any unique things you would like announced.  Be creative, it can be done!  Stock listing, tv schedule, NASCAR standings, Douglas Adams ebook, personal and work emails, calendar appointments...

Final Notes:

I will be supporting this, meaning if it breaks I am the one who has to redo my scripts.  If the format or language of the source data changes it would likely output gibberish.  I would then need to change the way I pull your information for tts and resend it to you.

I am a Portal fan so wherever possible I am trying to make my announcements shift pitch etc to sound like GLaDOS.  To do this I need to either create a new voice for festival or do some creative work with recurring statements within my announcements and lay them out as regular audio files to overlay announcements.  It's gonna be tricky but if I can get around some hurdles it would be amazing!

Future add-ons for this:  My HA theme is Portal/Max Headrom/LawnMowerMan(movie not book) inspired so to complete and compliment these announcements I hope to one-day to add video so that my home has a face and AI personality.  For a robotic persona I can fire a mpeg to on-screen orbiter of GLaDOS moving about while the announcements play, for a more human/cyborg persona I am going to have to come up with a way to mimic mouth movements and that is not going to be written this year...       


I made a wiki!  Click here to check out my system.

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Collaborator Wanted: Verbal Announcements
« Reply #1 on: September 02, 2012, 04:14:07 am »
The following doesn't sound right...

Quote
Roadblock =
Text to Speech template in LMCE only accepts 'quoted' statements.  There is no way to get a path/to/file.txt into the event/statement area.  

With careful script editing, you should be able to cat the text into the script without too much difficulty...

What about defining a bash script variable and use the cat command to assemble the text???

You could even set scripts to to assemble other scripts on either side of the quotes by creative use of the cat command...

Just theory of course...

PS: You really want something like this to be coming out of LinuxMCE?
http://www.youtube.com/watch?v=r3HeXxMGJvM&feature=related

« Last Edit: September 02, 2012, 04:40:23 am by JaseP »
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Collaborator Wanted: Verbal Announcements
« Reply #2 on: September 02, 2012, 05:33:55 am »
LinuxMCE wiki on TTS
Quote
1) Create a scenario. In this example, I'm just going to create a climate scenario called "Test" 2) From the edit scenario page of your new "Test" scenario, use the dropdown to edit using the Advanced wizard 3) Add a new command by using the Device drop-down to select "Text To Speech" 4) You will now get a box where you can select a command to use. Select the "Send Audio To Device" command. 5) You will now get a list of command parameters to fill out:

    103 List PK Device - enter a comma delimited list of devices to send the audio to. For our test, just look up the device number of your On Screen Orbiter, and enter it here.
    9 Text - Enter your text here, such as 'Hello. This is a test. A B C 1 2 3'. Notice the single-quotes - they must be used!
    278 Voice - Here is where you can select any one of the installed voices. The default installed voices are:

 

Quote
With careful script editing, you should be able to cat the text into the script without too much difficulty...

What about defining a bash script variable and use the cat command to assemble the text???

You could even set scripts to to assemble other scripts on either side of the quotes by creative use of the cat command...

The intention of this post and what I tried to explain is that I am incapable of getting this working and was looking to work with someone who could.  Your ideas might work, the ideas I had about how I might build a template might work, but what I am looking for is someone who can make it work.  If nobody is interested then after I finish up my scripts and voices I will have to learn the template side.

Quote
PS: You really want something like this to be coming out of LinuxMCE?
http://www.youtube.com/watch?v=r3HeXxMGJvM&feature=related

Yes.  Some people like BlueCrystal and some like Uita, some people adore Star Trek and make orbiter skins to look like Enterprise terminals.  I like Portal so want my tts to resemble the antagonist's voice.  Everyone's ideal smart home/HA experience is going to be slightly different.  Some prefer it silently running in the background where I like constant activity updates.  It's clunky and unnecessary but I like command received messages announced back to me. 

Insert DVD > "Preparing your media for playback" > movie starts > "Adjusting ambient light levels" > lights dim.

As long as I am not shooting YouTube videos or presenting custom events in a way that portrays it as LMCE default then it remains my preference.  For other users though who like this type of approach I will share my implementations and allow them to use them if they want or modify them to their preferences.
I made a wiki!  Click here to check out my system.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1087
  • hrumpf!
    • View Profile
    • Mah Website
Re: Collaborator Wanted: Verbal Announcements
« Reply #3 on: September 04, 2012, 12:55:01 am »
I bought an extra raspberry pi (which is in my hands as we speak) expressly for this purpose. I want to make little 'jarvis' type dce-connected devices that initially do simple things like

*give security status
*give overall home status

Is your stuff in the SVN?

-golgoj4
Official Releases
http://deb.linuxmce.org/QOrbiter-release.apk latest Qt4 android apk  http://deb.linuxmce.org/QOrbiterQt5-release.apk for the Qt5 Android version http://deb.linuxmce.org/QOrbiter-release.dmg for the MacOSX version

Unstable Nightlies
http://langstonball.com/downloads

JaseP

  • Addicted
  • *
  • Posts: 526
    • View Profile
    • JaseP's LinuxMCE Wiki User page
Re: Collaborator Wanted: Verbal Announcements
« Reply #4 on: September 04, 2012, 04:51:36 am »
I can help you vet your bash scripting... If that's how you will do it... But I am not in a position to be an expert,... My experience in this regard comes from document assembly stuff,... which is a similar to your approach in very many ways (I feel like I'm channeling C-3PO meeting Owen Lars for the first time, as far as he's aware,... talking about the binary language of moisture evaporators being similar to binary load lifters).

Anywho,... if you can develop a script that says what you want to say,... I can help you break it up in bits that can be assembled on the fly... All we need is a little text extracting magic, from the source application or utility, and a beginning and end piece for the script that's compatible with LinuxMCE initiated to convey the desire information...

I may (soon,... too soon) be having additional time (lack of employment related) giving me more time to contribute to the project and increasing my marketable skill set. In a spirit of turning lemons into lemonade, I'd be inclined to help the project move forward, even while I am treading water,... Ya know... make a positive out of a negative situation...
See my User page on the LinuxMCE Wiki for a description of my system configuration (click the little globe under my profile pic).

Armor Gnome

  • Guru
  • ****
  • Posts: 304
    • View Profile
Re: Collaborator Wanted: Verbal Announcements
« Reply #5 on: September 04, 2012, 07:12:58 am »
Is your stuff in the SVN?

Nothing is finished or polished enough to share yet.  I have devoted a room of the house for devices I want or need to write support for.  I am getting closer all the time now though and getting really comfortable in a few languages.  Interfacing with lmce is the biggest hurdle for me to figure out so I have several USB bootable OS's next to these devices to make them go.

I just looked at another user's qOrbiter UI build and saw each of the announcements I am working on floating at the top of the interface...  Amazing work!

I will slowly continue writing things to run on my hardware but am getting the idea on why there seemed to be a lack of interest, my hardware is truly that old.  Golgoj4, for your efforts on the new orbiter I would mail you a HDD with everything I have up to now!  Here are the latest current projects.

weather-utils grabber/parser/reader.  Working from command but not in lmce. (espeak & festival versions)

Portal UI skin, probably 75% done though I need to polish some hard to test screens.  Just to calm any possible concerns I contacted Valve and am hoping for a go-ahead to make available to DL.

iOS UI skin, abandoned at about 50% complete but with rendered images to finish 2-3 different ways.

DIY security panel image for hp t5500. $5 thin client acting as IP based security system 0.02W device - logging is functional and since the sensors wire to a keyboard I just need to change my keymapper and add time stamps.  After that's working I am faced with the socket communication nightmare.

Half a IR light template for usbuirt, don't think any progress is likely from where I am stuck.


Can't think of many other software projects I have put any time into lately.  Have been doing alot of building instead on things like my charging cradles, in wall touchscreens and av switchers.  -I am up to running 4 rooms on my single hybrid core.  For the moment it's switched manually for rooms 3 and 4 but looking for an IR solution to that.



I made a wiki!  Click here to check out my system.

golgoj4

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1087
  • hrumpf!
    • View Profile
    • Mah Website
Re: Collaborator Wanted: Verbal Announcements
« Reply #6 on: September 05, 2012, 04:04:05 am »
Nothing is finished or polished enough to share yet.  I have devoted a room of the house for devices I want or need to write support for.  I am getting closer all the time now though and getting really comfortable in a few languages.  Interfacing with lmce is the biggest hurdle for me to figure out so I have several USB bootable OS's next to these devices to make them go.

I just looked at another user's qOrbiter UI build and saw each of the announcements I am working on floating at the top of the interface...  Amazing work!

I will slowly continue writing things to run on my hardware but am getting the idea on why there seemed to be a lack of interest, my hardware is truly that old.  Golgoj4, for your efforts on the new orbiter I would mail you a HDD with everything I have up to now!  Here are the latest current projects.

weather-utils grabber/parser/reader.  Working from command but not in lmce. (espeak & festival versions)

Portal UI skin, probably 75% done though I need to polish some hard to test screens.  Just to calm any possible concerns I contacted Valve and am hoping for a go-ahead to make available to DL.

iOS UI skin, abandoned at about 50% complete but with rendered images to finish 2-3 different ways.

DIY security panel image for hp t5500. $5 thin client acting as IP based security system 0.02W device - logging is functional and since the sensors wire to a keyboard I just need to change my keymapper and add time stamps.  After that's working I am faced with the socket communication nightmare.

Half a IR light template for usbuirt, don't think any progress is likely from where I am stuck.


Can't think of many other software projects I have put any time into lately.  Have been doing alot of building instead on things like my charging cradles, in wall touchscreens and av switchers.  -I am up to running 4 rooms on my single hybrid core.  For the moment it's switched manually for rooms 3 and 4 but looking for an IR solution to that.





2 things

1) dont lose your work!!
2) always come by irc and ask a questions! Trust me on this one...the collective knowledge (even if sometimes delayed across time) is still really helpful in both the linuxmce ecosystem and in general.

I have a thought which i can pm you or something which ties into this in many ways

-golgoj4.
Official Releases
http://deb.linuxmce.org/QOrbiter-release.apk latest Qt4 android apk  http://deb.linuxmce.org/QOrbiterQt5-release.apk for the Qt5 Android version http://deb.linuxmce.org/QOrbiter-release.dmg for the MacOSX version

Unstable Nightlies
http://langstonball.com/downloads

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 890
  • Living with LMCE
    • View Profile
Re: Collaborator Wanted: Verbal Announcements
« Reply #7 on: September 06, 2012, 12:46:37 pm »
Hi,

I'm Dianemo user that really wants to get more Audio informations/announcements from my system. Not sure for LMCE, but under Dianemo speech announcement don't work if you're interrupting any other media being played. Weird things happen (mostly media won't continue after announcement, most of the time also announcement is cut off prior its end). I think announcements should be announced by some certain sound (so it can get attention), media faded to silent and back afterwards.... Also currently I'm not sure what happens if several announcements hit the engine at once...


But I guess more proper way wound be to divide into two separate tasks:
1. gathering informations from various sources into LMCE
2. using stored informations in verbal announcements

I'm not developer, so I'm not sure how this can be properly accomplished under LMCE/Dianemo... But I guess TextToSpeech needs some adjustments or bug fixing, and at the same time use of stored data in announcements could be introduced at the same time...

I'm also thinking about making those annoucements a bit more "human" (varying sentences for same bit of information), but yet don't know of any such system that would get announcements  closer to natural language.

HTH,
regards,

Bulek.

Thanks in advance,

regards,

Bulek.