Hi All, what about a Freeswitch module that integrates with a TTS engine through SAPI enviroment? Do you know if exists some initiative in this way? It would be great to use Microsoft's TTS engine that has a good quality and a large number of languages available. Thanks, Alex. <http://pt.slideshare.net/marketingteclan> <http://blog.teclan.com.br/>
If there is a command line tool that can utilize Microsoft's TTS engine, then you can use mod_tts_commandline <https://wiki.freeswitch.org/wiki/Mod_tts_commandline> On Fri, May 27, 2016 at 9:49 AM, Alex Pierry <alex@teclan.com.br> wrote:
Hi All,
what about a Freeswitch module that integrates with a TTS engine through SAPI enviroment? Do you know if exists some initiative in this way? It would be great to use Microsoft's TTS engine that has a good quality and a large number of languages available.
Thanks, Alex.
* <http://pt.slideshare.net/marketingteclan> *
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
I've been using this with the Translate service in Azure for TTS. It would probably be trivial to adapt that kind of client script to calling some service on IIS that uses SAPI. Here's a snippet from the script I use if you wanted to adapt it for your purposes... rest of script just has some local calling conventions and wrapping for caching the results as well as feeding it through a couple filters from sox utility to strip off leading/trailing silence. # # First get token # my $ua = new LWP::UserAgent; my $req = HTTP::Request->new( POST => "https://datamarket.accesscontrol.windows.net/v2/OAuth2-13" ); $req->content_type("application/x-www-form-urlencoded"); my @args = ( "grant_type" => "client_credentials", "client_id" => $msapp, "client_secret" => $msappkey, "scope" => "http://api.microsofttranslator.com" ); my @reqcontent = (); while (@args) { my $key = shift(@args); my $val = &Encode_URLEncode( shift(@args) ); push( @reqcontent, "$key=$val" ); } $req->content( join( "&", @reqcontent ) ); my $res = $ua->request($req); my $respcontent = $res->content; my $token; eval { my $data = decode_json($respcontent); $token = $data->{access_token}; }; my $options = "MaxQuality"; if ( $gender =~ m/^f/io ) { $options .= "|female"; } else { $options .= "|male"; } my @args = ( "language" => "en", "format" => "audio/wav", "options" => $options, "appid" => "", "text" => $text ); my @reqcontent = (); while (@args) { my $key = shift(@args); my $val = &Encode_URLEncode( shift(@args) ); push( @reqcontent, "$key=$val" ); } $req = HTTP::Request->new( GET => "https://api.microsofttranslator.com/V2/Http.svc/Speak?" . join( "&", @reqcontent ) ); $req->header( "Authorization" => "bearer $token" ); my $res = $ua->request($req); $content = $res->content; unlink($cachefile); unlink($cacheorig); if ( !$res->is_success ) { print "Failed API operation against microsoft TTS.\n"; exit(1); } open( my $out, ">$cacheorig" ); print $out $content; close($out); -- Nathan On 05/27/2016 09:35 AM, Abaci B wrote:
If there is a command line tool that can utilize Microsoft's TTS engine, then you can use mod_tts_commandline <https://wiki.freeswitch.org/wiki/Mod_tts_commandline>
On Fri, May 27, 2016 at 9:49 AM, Alex Pierry <alex@teclan.com.br <mailto:alex@teclan.com.br>> wrote:
Hi All,
what about a Freeswitch module that integrates with a TTS engine through SAPI enviroment? Do you know if exists some initiative in this way? It would be great to use Microsoft's TTS engine that has a good quality and a large number of languages available.
Thanks, Alex.
*/ *
* <http://pt.slideshare.net/marketingteclan> /*
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org <mailto:consulting@freeswitch.org> http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org <mailto:FreeSWITCH-users@lists.freeswitch.org> http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
_________________________________________________________________________ Professional FreeSWITCH Consulting Services: consulting@freeswitch.org http://www.freeswitchsolutions.com
Official FreeSWITCH Sites http://www.freeswitch.org http://confluence.freeswitch.org http://www.cluecon.com
FreeSWITCH-users mailing list FreeSWITCH-users@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-users UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users http://www.freeswitch.org
-- ------------------------------------------------------------ Nathan Neulinger nneul@mst.edu Missouri S&T Information Technology (573) 612-1412 System Administrator - Architect
participants (3)
-
Abaci B
-
Alex Pierry
-
Nathan Neulinger