Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: text2speech and speech recognition for perl in 2023

by Discipulus (Canon)
on Jan 31, 2023 at 11:51 UTC ( #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'></context> <co +ntext ID = 'time'>12:30</context> })"


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?

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

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2023-03-31 04:03 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (74 votes). Check out past polls.