Growl for Windows text-to-speech

286 views
Skip to first unread message

birkey

unread,
Dec 20, 2011, 11:31:13 AM12/20/11
to growl for windows

Is it possible to pass XML SAPI Tags to the speech engine or will this
be an enhancement request for the growl text-to-speech developer?

The SAPI engine can translate the speech using special tags see the
following link
http://msdn.microsoft.com/en-us/library/ms717077(v=vs.85).aspx

I am interested in using the following tags
<spell>,<emph> and especially <voice>
By using the <voice> tag you can change the voice used so you could
start out using a female voice then switch to a mail voice.


Thanks for the help.


Brian Dunnington

unread,
Dec 20, 2011, 8:47:53 PM12/20/11
to growl-fo...@googlegroups.com
I wasnt sure about the answer to this, so I investigated it quite a bit today.

The bad news is that the current Speak 'display' plugin does not work
with the SAPITTS xml that you linked to. The Speak display is written
in C# and apparently the managed wrapper does not support the SAPITTS
xml format, even though it is using the same Speech API behind the
scenes. If you pass the xml-encoded text to C#'s SpeechSynthesizer
class, it just reads it literally.

The good news is that the managed wrapper *does* support the SSML
markup language
(http://msdn.microsoft.com/en-us/library/system.speech.synthesis.speechsynthesizer.speakssml.aspx)
so it should be possible to supply some SSML-marked-up text and have
it honor the instructions. (Note that the current version of the Speak
plugin assumes the input is straight text, so it would need to be
modified in order to work with SSML). It would probably be easy enough
to detect if the input text is SSML markup or plain text and have the
display use the appropriate method. The SSML is a little more verbose,
but shouldnt be too hard to construct.

I did a quick test and was able to get the plugin to recognize the
SSML markup and speak it appropriately. I will try to polish it up a
bit and put out a new version sometime after the holidays.

> --
> You received this message because you are subscribed to the Google Groups "growl for windows" group.
> To post to this group, send email to growl-fo...@googlegroups.com.
> To unsubscribe from this group, send email to growl-for-wind...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/growl-for-windows?hl=en.
>

birkey

unread,
Jan 3, 2012, 2:15:03 PM1/3/12
to growl for windows
I can't seam to get the new update working for me.

Here is a Wireshark TCP Stream to show what I am passing to the speech
engine via Growl message

To:
GNTP/1.0 NOTIFY NONE
Application-Name: Speech
Notification-Name: OMC
Notification-Title: Alert
Notification-Text: This is the message for the pop-up messages, not
text to speech
Notification-Sticky: False
Notification-Icon: http://172.28.133.52/image/red-on.gif
X-Notification-Text-SSML: <s>The subject is:<break/><prosody
rate="slow">Tomorrows Meeting</prosody></s>
X-Notification-Title-SSML: You received an email from <emphasis
level="strong">Joe Schmoe</emphasis>



Here is the response
GNTP/1.0 -OK NONE
Response-Action: NOTIFY
Origin-Machine-Name: TEST
Origin-Software-Name: Growl/Win
Origin-Software-Version: 2.0.8.1
Origin-Platform-Name: Microsoft Windows NT 5.1.2600 Service Pack 3
Origin-Platform-Version: 5.1.2600.196608
X-Message-Daemon: Growl/Win
X-Timestamp: 1/3/2012 1:07:22 PM



The Text to speech engine is speaking "This is the message for the pop-
up messages, not text to speech"

I am sure I am missing something.


Any suggestions?


Thanks again for your help





On Dec 20 2011, 7:47 pm, Brian Dunnington <briandunning...@gmail.com>
wrote:
> I wasnt sure about the answer to this, so I investigated it quite a bit today.
>
> The bad news is that the current Speak 'display' plugin does not work
> with the SAPITTS xml that you linked to. The Speak display is written
> in C# and apparently the managed wrapper does not support the SAPITTS
> xml format, even though it is using the same Speech API behind the
> scenes. If you pass the xml-encoded text to C#'s SpeechSynthesizer
> class, it just reads it literally.
>
> The good news is that the managed wrapper *does* support the SSML
> markup language
> (http://msdn.microsoft.com/en-us/library/system.speech.synthesis.speec...)

Brian Dunnington

unread,
Jan 3, 2012, 2:41:30 PM1/3/12
to growl-fo...@googlegroups.com
I tried it here and got it to work, but there are two things to note:

1. make sure you actually have the updated Speak plugin installed.
Some browsers will cache the download, so you dont actually get the
updated files. The Speak.dll should have a date from December or
later.

2. Make sure there are no extra line breaks in your message. When I
copy your message from this email, there are extra line breaks in it
that cause the GNTP parser to fail. I am not sure if that is due to my
email client inserting those linebreaks or if that is how it came from
the Wireshark capture, but linebreaks have special meaning to GNTP.
(and if the Speak display fails to be able to parse/speak the SSML, it
falls back to the normal title/text values).

Double check those and let me know how it goes.

birkey

unread,
Jan 3, 2012, 4:17:48 PM1/3/12
to growl for windows
I uninstalled and installed a copy from scratch.
Files in c:\Program Files\Growl Extras\Speak Display are...

Growl.CoreLibrary.dll 28kb 11/23/2011 11:35AM
Display Installer.InstallState 3Kb 1/3/2012
Display Installer.dll 16KB 8/26/2011


Files in c:\Program Files\Growl for Windows\Displays\Speak Display
speak.dll 6kb 12/23/2011
Growl.DisplayStyle.dll 11/23/2011
Growl.CoreLibrary.dll 11/23/2011


The Chr Return in the past post was a copy and paste issue... There is
no \n between the lines... Sorry.
GNTP/1.0 NOTIFY NONE
Application-Name: Speech
Notification-Name: OMC
Notification-Title: Alert
Notification-Text: This is the message for the pop-up messages, not
text to speech
Notification-Sticky: False
Notification-Icon: http://172.28.133.52/image/red-on.gif
X-Notification-Text-SSML: <s>The subject is:<break/><prosody
rate="slow">Tomorrows Meeting</prosody></s>
X-Notification-Title-SSML: You received an email from <emphasis
level="strong">Joe Schmoe</emphasis>


GNTP/1.0 -OK NONE
Response-Action: NOTIFY
Origin-Machine-Name: TEST
Origin-Software-Name: Growl/Win
Origin-Software-Version: 2.0.8.1
Origin-Platform-Name: Microsoft Windows NT 5.1.2600 Service Pack 3
Origin-Platform-Version: 5.1.2600.196608
X-Message-Daemon: Growl/Win
X-Timestamp: 1/3/2012 1:07:22 PM

Brian Dunnington

unread,
Jan 3, 2012, 4:54:38 PM1/3/12
to growl-fo...@googlegroups.com
And is it still not working then? I downloaded the files from the
website myself just to be sure I had the same setup as you, and it
works here.

One other thing to check is if you have more than one copy of the
Speak display installed. If you ever used the 'Install Now' button, it
installs the display in your local user folder instead of in the
Program Files folder, so check here:
%LOCALAPPDATA%\Growl\2.0.0.0\Displays\

(if you have the display in both places, the local version takes
precedence and if you didnt update that version, you will still have
the old version being used by GfW).

birkey

unread,
Jan 4, 2012, 3:08:15 PM1/4/12
to growl for windows
Working now Thanks Brian!

I needed to uninstall via the setup.exe, restart growl, install via
the "Install now" button on the speech display page then restart
Growl.

A fun way to test Brian's patch is to setup the default display to
"Speak"
Turn off require password for Local and LAN apps

open up a command prompt on the same system running growl and telnet
localhost 23053
Hit return once
If you do not get an error then Growl is waiting for some input...

Now copy and paste the following ( make sure when you copy 7 lines..
depending on your window size the lines may be split )
Hit return a few times and enjoy

GNTP/1.0 NOTIFY NONE
Application-Name: Speech
Notification-Name: TEST
Notification-Title: If you hear this then the patch is not working!
Notification-Text: you need to uninstall the old and reinstall
X-Notification-Title-SSML: It is working but we have a Windows
<emphasis level="strong">ERROR</emphasis>
X-Notification-Text-SSML: <audio src="http://www.franksradio.net/
startrek/sounds/COMPUTER-10%20seconds%20til%20Auto-Destruct.wav"></
audio> 1 2 3 4 5 6 7 8 9 10... Boom

Brian Dunnington

unread,
Jan 4, 2012, 3:47:13 PM1/4/12
to growl-fo...@googlegroups.com
ha - glad to *hear* it is working. i was wondering how much support it
would have for the full SSML elements, so it is good to see that it
supports the <audio> tag.

if you end up building something cool with it, definitely let the group know.

Reply all
Reply to author
Forward
0 new messages