It is currently August 18th, 2019, 6:19 pm

Speech Plugin 2.4

Plugins and Addons popular with the Community
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Speech Plugin

balala » January 28th, 2019, 6:53 pm

jsmorley wrote:
January 28th, 2019, 6:47 pm
Afacere buna!
:thumbup:
jsmorley wrote:
January 28th, 2019, 6:47 pm
What I'm looking to do is add the ability to enumerate the voices into an array, so I can add an option like Index=1, or Index=4, and the user can just try installed voices until they get one they like.
Yes, probably this is a much more viable way.
Thanks again.
User avatar
eclectic-tech
Rainmeter Sage
Posts: 3480
Joined: April 12th, 2012, 9:40 pm
Location: Cedar Point, Ohio, USA

Re: Speech Plugin

eclectic-tech » January 28th, 2019, 8:53 pm

Thanks for the winero link... I used that before to install 'Microsoft Eva Mobile' voice, but completely forgot about that link. O.O

Now I have 3 new Aussie voices! Matilda is from the Cortana voices (she sounds great) 8-)
speech.png
Still have that short name issue ;-) Thanks JSM!
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin

jsmorley » January 28th, 2019, 9:00 pm

eclectic-tech wrote:
January 28th, 2019, 8:53 pm
Thanks for the winero link... I used that before to install 'Microsoft Eva Mobile' voice, but completely forgot about that link. O.O

Now I have 3 new Aussie voices! Matilda is from the Cortana voices (she sounds great) 8-)
speech.png

Still have that short name issue ;-) Thanks JSM!
Yeah, I didn't want to have to have separate meters for culture/name/gender/age, but guess I will have to to line things up properly.

Someday we need to add some "positioning" capabilities to InlineSetting...

InlineSetting=X+30
InlinePattern=Male | Female

Or

InlineSetting=Table | 30 | Left
InlinePattern=Male | Female
User avatar
balala
Rainmeter Sage
Posts: 8534
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Speech Plugin

balala » January 28th, 2019, 9:09 pm

jsmorley wrote:
January 28th, 2019, 9:00 pm
Someday we need to add some "positioning" capabilities to InlineSetting...

InlineSetting=X+30
InlinePattern=Male | Female

Or

InlineSetting=Table | 30 | Left
InlinePattern=Male | Female
Add them if possible. Would be a great help whenever we're creating tables. :thumbup:
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin

jsmorley » January 29th, 2019, 1:28 am

Ok, updated the example skin again to fix the formatting with short "Names" and to add an indicator of what the currently "selected" voice is. This is what is going to be saved if you click "Finish".

https://forum.rainmeter.net/viewtopic.php?f=18&t=31161&p=158239#p158239


1.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin 2.4

jsmorley » January 30th, 2019, 9:54 pm

The plugin has been drastically reworked to:

1) Add a new Index option, which is the number in the list of supported voices on your system to use, as in "The 4th voice". If used in conjunction with Gender, it can be used to say "The 3rd male voice". This option is ignored if a specific Name is used.

The idea of Index is this. Since you can't possibly know what voices may or may not be installed on any user's system, it might be safest to distribute skins with just Index=1, which is certain to work, and then let the end user try different Index options until they find the voice they want to use on their system.

2) The total count of installed voices, or in other words the maximum Index, on your system will be the number value of the measure.
The idea here is to support some "Previous Voice >> Next Voice" functionality you might want in your skin.

3) The currently selected voice name will be the string value of the measure.

4) Add a new Debug option. When set to 1, the measure will output the list of names and attributes for all your installed voices in the Rainmeter Log.

5) Improve efficiency and reliability.

6) Add some error trapping if the options used don't result in a supported voice on your system. The first best matching voice will be used instead, and a Notice message will be logged in Rainmeter.

https://forum.rainmeter.net/viewtopic.php?f=18&t=31161&p=158239#p158239


The example skin has been changed to demonstrate support for the new Index option.

zelda.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin 2.4

jsmorley » January 31st, 2019, 2:08 am

Here is a rudimentary example demonstrating how you might use the new Index option, and the fact that the number value of the measure is now the total count of installed voices on your system.

SpeechWIndex_Jan 31, 2019.rmskin

1.jpg

Code: Select all

[Rainmeter]
Update=1000
AccurateText=1
DynamicWindowSize=1
ContextTitle=Open @Includes folder
ContextAction=["#@#"]

[Metadata]
Name=SpeechWIndex
Author=JSMorley
Information=Demonstrates the included Speech Plugin, Speech.dll | https://forum.rainmeter.net/viewtopic.php?f=18&t=31161
License=Creative Commons Attribution-Non-Commercial-Share Alike 3.0
Version=January 30, 2019

[Variables]
@Include=#@#SpeechVars.inc

[SpeechHost]
Measure=Plugin
Plugin=Speech
;Name=#Name#
;Gender=#Gender#
Index=#Index#
Volume=#Volume#
Rate=#Rate#
UpdateDivider=-1
DynamicVariables=1

[MeterVoiceName]
Meter=String
MeasureName=SpeechHost
W=260
X=130
StringAlign=Center
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "152,255,188,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!CommandMeasure SpeechHost ""][!CommandMeasure SpeechHost "This is [SpeechHost]"]

[MeterLeft]
Meter=String
X=270
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,4,5,2
AntiAlias=1
DynamicVariables=1
Text=◀
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "152,255,188,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!SetVariable Index "(Clamp(#Index#-1,1,[SpeechHost:]))"][!CommandMeasure SpeechHost ""][!UpdateMeasure SpeechHost][!CommandMeasure SpeechHost "This is [SpeechHost]"][!Update]

[MeterCounts]
Meter=String
W=120
X=365
StringAlign=Center
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
DynamicVariables=1
Text=Voice #Index# of [SpeechHost:]

[MeterRight]
Meter=String
X=435
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,4,5,2
AntiAlias=1
DynamicVariables=1
Text=▶
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "152,255,188,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!SetVariable Index "(Clamp(#Index#+1,1,[SpeechHost:]))"][!CommandMeasure SpeechHost ""][!UpdateMeasure SpeechHost][!CommandMeasure SpeechHost "This is [SpeechHost]"][!Update]

[MeterSave]
Meter=String
Y=5R
X=0
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Save
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "152,255,188,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!WriteKeyValue Variables Index "#Index#" "#@#SpeechVars.inc"][!Refresh]

[MeterCancel]
Meter=String
Y=0r
X=10R
FontSize=13
FontWeight=400
FontColor=255,255,255,255
SolidColor=47,47,47,255
Padding=5,5,5,5
AntiAlias=1
Text=Cancel
MouseOverAction=[!SetOption #CURRENTSECTION# FontColor "152,255,188,255"][!UpdateMeter *][!Redraw]
MouseLeaveAction=[!SetOption #CURRENTSECTION# FontColor "255,255,255,255"][!UpdateMeter *][!Redraw]
LeftMouseUpAction=[!Refresh]

Keep in mind that the total number of voices returned in the number value of the measure is NOT limited by any Gender you set on the measure, so be careful about depending on the number to step through voices if you have limited what can be used by Gender. You might have 5 voices, but only 3 Female voices.
You do not have the required permissions to view the files attached to this post.
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin 2.4

jsmorley » January 31st, 2019, 7:49 am

A new 2.4 version of the plugin is available, which tweaks some internal things and adds the ability to add Debug=1 to the measure, which will output tons of information about the voices on your system in the log.

https://forum.rainmeter.net/viewtopic.php?f=18&t=31161#p158239

Code: Select all

NOTE (08:59:09.305) SpeechWSelect\Speech.ini - [SpeechHost]: ------------------------------
NOTE (08:59:09.307) SpeechWSelect\Speech.ini - [SpeechHost]: * Speech.dll - GetInstalledVoices() API
NOTE (08:59:09.308) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 1
NOTE (08:59:09.310) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft David Desktop
NOTE (08:59:09.312) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Male
NOTE (08:59:09.313) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-US
NOTE (08:59:09.315) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.317) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft David Desktop - English (United States)
NOTE (08:59:09.318) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : TTS_MS_EN-US_DAVID_11.0
NOTE (08:59:09.320) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.321) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 2
NOTE (08:59:09.323) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft James
NOTE (08:59:09.325) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Male
NOTE (08:59:09.326) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-AU
NOTE (08:59:09.328) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.329) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft James - English (Australia)
NOTE (08:59:09.331) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : MSTTS_V110_enAU_JamesM
NOTE (08:59:09.332) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.334) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 3
NOTE (08:59:09.335) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft Matilda Mobile
NOTE (08:59:09.337) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Female
NOTE (08:59:09.338) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-AU
NOTE (08:59:09.340) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.342) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft Matilda Mobile - English (Australia)
NOTE (08:59:09.343) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : MSTTS_V110_enAU_MatildaM
NOTE (08:59:09.345) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.346) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 4
NOTE (08:59:09.348) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft Eva Mobile
NOTE (08:59:09.350) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Female
NOTE (08:59:09.351) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-US
NOTE (08:59:09.353) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.354) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft Eva Mobile - English (United States)
NOTE (08:59:09.356) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : MSTTS_V110_enUS_EvaM
NOTE (08:59:09.357) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.359) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 5
NOTE (08:59:09.361) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft Mark
NOTE (08:59:09.362) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Male
NOTE (08:59:09.364) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-US
NOTE (08:59:09.365) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.367) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft Mark - English (United States)
NOTE (08:59:09.369) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : MSTTS_V110_enUS_MarkM
NOTE (08:59:09.370) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.372) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 6
NOTE (08:59:09.373) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft Catherine
NOTE (08:59:09.375) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Female
NOTE (08:59:09.376) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-AU
NOTE (08:59:09.378) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.379) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft Catherine - English (Australia)
NOTE (08:59:09.381) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : MSTTS_V110_enAU_CatherineM
NOTE (08:59:09.382) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.384) SpeechWSelect\Speech.ini - [SpeechHost]: Index: 7
NOTE (08:59:09.386) SpeechWSelect\Speech.ini - [SpeechHost]:   Name          : Microsoft Zira Desktop
NOTE (08:59:09.387) SpeechWSelect\Speech.ini - [SpeechHost]:   Gender        : Female
NOTE (08:59:09.389) SpeechWSelect\Speech.ini - [SpeechHost]:   Culture       : en-US
NOTE (08:59:09.391) SpeechWSelect\Speech.ini - [SpeechHost]:   Age           : Adult
NOTE (08:59:09.392) SpeechWSelect\Speech.ini - [SpeechHost]:   Description   : Microsoft Zira Desktop - English (United States)
NOTE (08:59:09.394) SpeechWSelect\Speech.ini - [SpeechHost]:   ID            : TTS_MS_EN-US_ZIRA_11.0
NOTE (08:59:09.396) SpeechWSelect\Speech.ini - [SpeechHost]:   Enabled       : True
NOTE (08:59:09.397) SpeechWSelect\Speech.ini - [SpeechHost]: ------------------------------
Yincognito
Posts: 652
Joined: February 27th, 2015, 2:38 pm

Re: Speech Plugin 2.4

Yincognito » February 3rd, 2019, 6:12 am

Very nice plugin, jsmorley! This could be good at speaking the time to the user (this is what I would use it for) :D
Of course, the ultimate thing would be to give commands to a Rainmeter skin using the speech recognition feature (yes, it's different from text-to-speech, but since we're at it)... ;-) That would probably be more complicated though ... brings back to me memories of a certain software named (Promixis) Girder that used to let the user control the PC using the remote, the speech recognition, etc. Sadly, like most good things, that one is dead.

And now that I know it works for Andrei as well (thanks balala) - that makes the prospect sweeter. Still going to use some English voice though, I am disappointed that certain folks (not the MS ones) can't even make a Microsoft "Andrei" sound accurate...
User avatar
jsmorley
Developer
Posts: 19374
Joined: April 19th, 2009, 11:02 pm
Location: Fort Hunt, Virginia, USA

Re: Speech Plugin 2.4

jsmorley » February 3rd, 2019, 12:35 pm

Yincognito wrote:
February 3rd, 2019, 6:12 am
Very nice plugin, jsmorley! This could be good at speaking the time to the user (this is what I would use it for) :D
Of course, the ultimate thing would be to give commands to a Rainmeter skin using the speech recognition feature (yes, it's different from text-to-speech, but since we're at it)... ;-) That would probably be more complicated though ... brings back to me memories of a certain software named (Promixis) Girder that used to let the user control the PC using the remote, the speech recognition, etc. Sadly, like most good things, that one is dead.

And now that I know it works for Andrei as well (thanks balala) - that makes the prospect sweeter. Still going to use some English voice though, I am disappointed that certain folks (not the MS ones) can't even make a Microsoft "Andrei" sound accurate...
Speech recognition and text-to-speech are so completely different things that this is actually off-topic here. ;-)

If someone is inclined to tackle speech recognition, ala Cortana, in Rainmeter, more power to them. It is not something I would even be interested in. You do understand the difference in complexity between outputting specific text to an engine that can speak in a handful of carefully designed voices, and understanding spoken input that will be in hundreds of languages, each with their own word ordering and other grammar rules, untold thousands of regional dialects, people with colds, hangovers, speech impediments, ill-fitting dentures, cheap microphones, dogs barking in the background, and then using AI to derive the meaning from piecing together words and making sense of it from the words and the order and context they are used in? The best of them, probably Google Assistant or Alexa, have dozens of people who have worked for years on them, and they are still marginally retarded.

Speech synthesis is complex in its own right, as they have spent a lot of time figuring out how to pronounce things like "I read a book", which can sensibly be spoken two different ways, with no hint in that sentence alone, without further context. Or how 2019 should be spoken. It might be "two thousand and nineteen" or "twenty nineteen", or "two zero one nine" depending on the context. Is this a date? Are you sure? Speech recognition is a whole different level of complexity, orders of magnitude higher, even if you are not going for "natural language" recognition, but simply "keywords" that have defined actions. Speech recognition generally involves "training" the system with your own voice.

Microsoft may or may not have some exposed API interface to the Cortana stuff, I have no idea. I suspect not, since if they did, there would be apps out there that could respond to spoken input properly and take actions, but other than some really expensive and arguably shitty stuff like Dragon Speaking, I don't know of any. I can't imagine that Microsoft would be thrilled with hundreds of Cortana knockoffs making their hideous attempt at getting Cortana to even approach Google Assistant or Alexa or Siri even more hopeless than it already is. My recommendation would be to install Alexa. I believe that can be installed on Windows 10.

Text-to-Speech is fun for speaking the date and time, or weather, or maybe "You've got mail!" or other notification things like that.

Probably best to start a new topic if you want to explore speech recognition. It has nothing at all to do with speaking, it has to do with listening.