Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: text2speech and speech recognition for perl in 2023

by Discipulus (Canon)
on Jan 31, 2023 at 11:51 UTC ( [id://11150052]=note: print w/replies, xml ) Need Help??


in reply to text2speech and speech recognition for perl in 2023

some further research findings:

About Win32::SAPI5 (module code indecryptable by me: I cannot even find the Speak method :) ..just to have somewhere to record my tries:

perl -MWin32::SAPI5 -MClass::Inspector -MData::Dumper -e "print Dumper + \Class::Inspector->methods('Win32::SAPI5::SpVoice','expanded')" [..] # or perl -MWin32::SAPI5 -e "for (sort keys %Win32::SAPI5::SpVoice::){print + qq($_\n) if exists &{qq(Win32::SAPI5::SpVoice::$_)}}" # working perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); print for + $voice->GetInstalledLanguages" Italian (Italy)English (United States of America) # NOT working perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); print for + $voice->GetInstalledVoices" # working pitch perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <pitch absmiddle='10'>This is a test.</pitch>})" perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <pitch absmiddle='-10'>This is a test.</pitch>})" # working absspeed from -10 .. 10 ? perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <rate absspeed='-10'>this is some input text</rate>})" # working silence and spelling perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{<silencemsec='500'/> <spell>UN</spell>})" # working fortmat date perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <says-as interpret-as='date'> 4/12/1972 })" #wondering if it works :) perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <prompt>If I want I can <prosody rate='+150%'>spee +d up the rate</prosody></prompt> })" # not working perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ Today is <Context ID='date'>01/31/2023</Context> + })" # working but not with text in front of tags perl -MWin32::SAPI5 -e "$voice=Win32::SAPI5::SpVoice->new(); $voice->S +peak( q{ <context ID = 'web_url'>www.perl.org</context> <co +ntext ID = 'time'>12:30</context> })"

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11150052]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (5)
As of 2024-03-28 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found