Google text to speech and speech to text

Status
Not open for further replies.

arfio

Joined
May 5, 2009
Messages
40
Reaction score
0
Hi everybody !

Googling around i found some script (i modified for may own need) the let you use the google text to speech and speech to text engine. I want just share this with you all because i think is usefull.


I use two agi script:

googletts.agi for text to speech and speech-recog.agi for speech to text

here is the original scripts: googletts and speech-recog



=============================================
Google TTS script for Asterisk
=============================================

This script makes use of Google's translate text to speech service
in order to redner text to speech and play it back to the user.
It supports a variety of different languages.

------------
Requirements
------------
Perl The Perl Programming Language
perl-libwww The World-Wide Web library for Perl
sox Sound eXchange, sound processing program
mpg123 MPEG Audio Player and decoder
format_sln Raw slinear module for asterisk
Internet access in order to contact google and get the voice data.

------------
Installation
------------
To install copy googletts.agi to your agi-bin directory.
Usually this is /var/lib/asterisk/agi-bin/
To make sure check your /etc/asterisk/asterisk.conf file

-----
Usage
-----
agi(googletts.agi,text,[language],[intkey]): This will invoke the Google TTS engine,
render the text string to speech and play it back to the user. If 'intkey' is set
the script will wait for user input. Any given interrupt keys will cause the playback
to immediately terminate and the dialplan to proceed to the matching extension (for use in IVR).

The script contacts google's TTS service in order to get the voice data
which then stores in a local cache (by default /tmp/) for future use.
Parameters like default language, enabling or disabling caching and cache dir
can be set up by editing the script.

--------
Examples
--------
sample dialplan code for your extensions.conf

;GoogleTTS Demo
;PLayback messages to user

exten => 1234,1,Answer()
;;Play mesage in English:
exten => 1234,n,agi(googletts.agi,"This is a simple google text to speech test in english.",en)
;;Play message in Spanish
exten => 1234,n,agi(googletts.agi,"Esta es una simple prueba en espa?±ol.",es)
;;Play message in Greek
exten => 1234,n,agi(googletts.agi,"ŒëœÖœÑœå ŒµŒØŒ?Œ±Œ? Œ?Œ?Œ± Œ±œÄŒªœå œÑŒ?œÉœÑ œÉœÑŒ± ŒµŒªŒªŒ?Œ?Œ?Œ?Œ¨.",el)

;A simple dynamic IVR using GoogleTTS

[my_ivr]
exten => s,1,Answer()
exten => s,n,Set(TIMEOUT(digit)=5)
exten => s,n,agi(googletts.agi,"Welcome to my small interactive voice response menu.",en)
;;Wait for digit:
exten => s,n(start),agi(googletts.agi,"Please dial a digit.",en,any)
exten => s,n,WaitExten()

;;PLayback the name of the digit and wait for another one:
exten => _X,1,agi(googletts.agi,"You just pressed ${EXTEN}. Try another one please.",en,any)
exten => _X,n,WaitExten()

exten => i,1,agi(googletts.agi,"Invalid extension.",en)
exten => i,n,goto(s,start)

exten => t,1,agi(googletts.agi,"Request timed out.",en)
exten => t,n,goto(s,start)

exten => h,1,Hangup()

-------------------
Supported Languages
-------------------
"af" Afrikaans, "sq" Albanian, "am" Amharic, "ar" Arabic, "hy" Armenian, "az" Azerbaijani,
"eu" Basque, "be" Belarusian, "bn" Bengali, "bh" Bihari, "bs" Bosnian, "br" Breton, "bg" Bulgarian,
"km" Cambodian, "ca" Catalan, "zh-CN" Chinese (Simplified), "zh-TW" Chinese (Traditional),
"co" Corsican, "hr" Croatian, "cs" Czech, "da" Danish, "nl" Dutch, "en" English, "eo" Esperanto,
"et" Estonian, "fo" Faroese, "tl" Filipino, "fi" Finnish, "fr" French, "fy" Frisian, "gl" Galician,
"ka" Georgian, "de" German, "el" Greek, "gn" Guarani, "gu" Gujarati, "xx-hacker" Hacker, "ha" Hausa,
"iw" Hebrew, "hi" Hindi, "hu" Hungarian, "is" Icelandic, "id" Indonesian, "ia" Interlingua, "ga" Irish,
"it" Italian, "ja" Japanese, "jw" Javanese, "kn" Kannada, "kk" Kazakh, "rw" Kinyarwanda,
"rn" Kirundi, "xx-klingon" Klingon, "ko" Korean, "ku" Kurdish, "ky" Kyrgyz, "lo" Laothian,
"la" Latin, "lv" Latvian, "ln" Lingala, "lt" Lithuanian, "mk" Macedonian, "mg" Malagasy,
"ms" Malay, "ml" Malayalam, "mt" Maltese, "mi" Maori, "mr" Marathi, "mo" Moldavian, "mn" Mongolian,
"sr-ME" Montenegrin, "ne" Nepali, "no" Norwegian, "nn" Norwegian (Nynorsk), "oc" Occitan, "or" Oriya,
"om" Oromo, "ps" Pashto, "fa" Persian, "xx-pirate" Pirate, "pl" Polish, "pt-BR" Portuguese (Brazil),
"pt-PT" Portuguese (Portugal), "pa" Punjabi, "qu" Quechua, "ro" Romanian, "rm" Romansh, "ru" Russian,
"gd" Scots Gaelic, "sr" Serbian, "sh" Serbo-Croatian, "st" Sesotho, "sn" Shona, "sd" Sindhi,
"si" Sinhalese, "sk" Slovak, "sl" Slovenian, "so" Somali, "es" Spanish, "su" Sundanese, "sw" Swahili,
"sv" Swedish, "tg" Tajik, "ta" Tamil, "tt" Tatar, "te" Telugu, "th" Thai, "ti" Tigrinya, "to" Tonga,
"tr" Turkish, "tk" Turkmen, "tw" Twi, "ug" Uighur, "uk" Ukrainian, "ur" Urdu, "uz" Uzbek,
"vi" Vietnamese, "cy" Welsh, "xh" Xhosa, "yi" Yiddish, "yo" Yoruba, "zu" Zulu.

-------
License
-------
The GoogleTTS script for asterisk is distributed under the GNU General Public
License v2. See COPYING for details.






==============================================
Speech recognition script for Asterisk
==============================================

This script makes use of Google's speech recognition engine
in order to render speech to text and return it back to the dialplan
as an asterisk channel variable.

------------
Requirements
------------
Perl The Perl Programming Language
perl-libwww The World-Wide Web library for Perl
flac Free Lossless Audio Codec
Internet access in order to contact google and get the speech data.

The script can optionally use sox for sound conversion. It works with recent
versions of sox (It will not work in RHEL/Centos 5).

------------
Installation
------------
To install copy speech-recog.agi to your agi-bin directory.
Usually this is /var/lib/asterisk/agi-bin/
To make sure check your /etc/asterisk/asterisk.conf file

-----
Usage
-----
agi(speech-recog.agi,[lang],[timeout])
Records from the current channel untill the pound key (#) is pressed or the
timeout (set to 10 seconds by default, -1 for no timeout) is reached.
The recording is send over to googles speech recognition service and the
returned text string is assigned as the value of the channel variable 'utterance'.
The scripts sets the following channel variables:
status : Return status. 0 means success, non zero values indicating different errors.
id : Some id string that googles engine returns, not very useful(?).
utterance : The generated text string.
confidence : A value between 0 and 1 indicating the probability of a correct recognition.
Values bigger than 0.95 usually mean that the resulted text is correct.

--------
Examples
--------
sample dialplan code for your extensions.conf

;Simple speech recognition
exten => 1234,1,Answer()
exten => 1234,n,agi(speech-recog.agi,en-US)
exten => 1234,n,Noop(== The text you just said is: ${utterance} ==)
exten => 1234,n,Noop(== The probability to be right is: ${confidence} ==)
exten => 1234,n,Hangup()

;Speech recognition demo also using googletts.agi for text to speech synthesis:
exten => 1235,1,Answer()
exten => 1235,n,agi(googletts.agi,"Say something in English, when done press the pound key.",en)
exten => 1235,n(record),agi(speech-recog.agi,en-US)
exten => 1235,n,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 1235,n,GotoIf($["${status}" = "0"]?success:fail)

exten => 1235,n(success),GotoIf($["${confidence}" > "0.8"]?playback:retry)

exten => 1235,n(playback),agi(googletts.agi,"The text you just said was...",en)
exten => 1235,n,agi(googletts.agi,"${utterance}",en)
exten => 1235,n,goto(end)

exten => 1235,n(retry),agi(googletts.agi,"Can you please repeat more clearly?",en)
exten => 1235,n,goto(record)

exten => 1235,n(fail),agi(googletts.agi,"Failed to get speech data.",en)
exten => 1235,n(end),Hangup()

;Voice dialing example
exten => 1236,1,Answer()
exten => 1236,n,agi(googletts.agi,"PLease say the number you want to dial.",en)
exten => 1236,n(record),agi(speech-recog.agi,en-US)
exten => 1236,n,GotoIf($[$["${status}" = "0"] & $["${confidence}" > "0.8"]]?success:retry)

exten => 1236,n(success),goto(${utterance})

exten => 1236,n(retry),agi(googletts.agi,"Can you please repeat?",en)
exten => 1236,n,goto(record)

-------------------
Supported Languages
-------------------
English
Afrikaans
Arabic
Chinese
Czech
Dutch
French
German
Hebrew
Italian
Indonesian
Japanese
Korean
Latin
Malaysian
Polish
Portuguese
Russian
Spanish
Turkish
Yue Chinese (Traditional Hong Kong)
Zulu

-----------------------
Security Considerations
-----------------------
This script contacts google's servers in order send the recorded voice data and get back
the resulted text. If you are using voice recognition for sensitive data or you want to
make sure that no 3rd party can eavesdrop your communication with the google service it is
advised to enable the use of SSL in the script. This will encrypt all the traffic between
your pbx and google servers making it much safer.
To enable the use of SSL set the variable '$use_ssl' to 1 in the script. Keep in mind that
security comes with a price, the initialisation of the SSL session adds a small delay in
communication (usually under 1 sec).

-------
License
-------
The speech-recog script for asterisk is distributed under the GNU General Public
License v2. See COPYING for details.




I hope this could be useful for you
 
how can i instell this

Perl The Perl Programming Language
perl-libwww The World-Wide Web library for Perl
sox Sound eXchange, sound processing program
mpg123 MPEG Audio Player and decoder
format_sln Raw slinear module for asterisk
Internet access in order to contact google and get the voice data.
 
yum install perl-libwww
yum install sox
yum install mpg123

if you can not find on the standare repository try search the packages in rpmfind or pbone.net (search accoording with your centos version).
 
i install all rpm

when i dial 1235 or 1236 i hear the message "Say something in English, when done press the pound key" and the system do not wait for my answer
the asterisk say "failed to get speech data"
 
check if all packages are installed

check if the scripts ar installed on the agi-bin directory (usually /var/lib/asterisk/agi-bin)

check if the scripts are executable (chmod +x)

.... and try again


if it do not work, post me the asterisk log

;)
 
all packages are installed

the scripts installed on the agi-bin directory /var/lib/asterisk/agi-bin

scripts are executable





this is a asterisk log

== Using SIP RTP TOS bits 184
== Using SIP RTP CoS mark 5
-- Executing [1235@from-internal:1] Answer("SIP/200-00000001", "") in new stack
-- Executing [1235@from-internal:2] AGI("SIP/200-00000001", "googletts.agi,"Say something in English, when done press the pound key.",en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- Playing '/tmp/6be952445fa092f54aa606501ac6c1b9' (escape_digits=) (sample_offset 0)
-- <SIP/200-00000001>AGI Script googletts.agi completed, returning 0
-- Executing [1235@from-internal:3] AGI("SIP/200-00000001", "speech-recog.agi,en-US") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
-- <SIP/200-00000001>AGI Script speech-recog.agi completed, returning 0
-- Executing [1235@from-internal:4] NoOp("SIP/200-00000001", "= Script returned: , , , =") in new stack
-- Executing [1235@from-internal:5] GotoIf("SIP/200-00000001", "0?success:fail") in new stack
-- Goto (from-internal,1235,12)
-- Executing [1235@from-internal:12] AGI("SIP/200-00000001", "googletts.agi,"Failed to get speech data.",en") in new stack
-- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
-- Playing '/tmp/1c0c50156168e6127c66f71b7858c3f9' (escape_digits=) (sample_offset 0)
-- <SIP/200-00000001>AGI Script googletts.agi completed, returning 0
-- Executing [1235@from-internal:13] Hangup("SIP/200-00000001", "") in new stack
== Spawn extension (from-internal, 1235, 13) exited non-zero on 'SIP/200-00000001'
-- Executing [h@from-internal:1] Macro("SIP/200-00000001", "hangupcall") in new stack
-- Executing [s@macro-hangupcall:1] GotoIf("SIP/200-00000001", "1?endmixmoncheck") in new stack
-- Goto (macro-hangupcall,s,9)
-- Executing [s@macro-hangupcall:9] NoOp("SIP/200-00000001", "End of MIXMON check") in new stack
-- Executing [s@macro-hangupcall:10] GotoIf("SIP/200-00000001", "1?nomeetmemon") in new stack
-- Goto (macro-hangupcall,s,15)
-- Executing [s@macro-hangupcall:15] NoOp("SIP/200-00000001", "MEETME_RECORDINGFILE=") in new stack
-- Executing [s@macro-hangupcall:16] GotoIf("SIP/200-00000001", "1?noautomon") in new stack
-- Goto (macro-hangupcall,s,18)
-- Executing [s@macro-hangupcall:18] NoOp("SIP/200-00000001", "TOUCH_MONITOR_OUTPUT=") in new stack
-- Executing [s@macro-hangupcall:19] GotoIf("SIP/200-00000001", "1?noautomon2") in new stack
-- Goto (macro-hangupcall,s,25)
-- Executing [s@macro-hangupcall:25] NoOp("SIP/200-00000001", "MONITOR_FILENAME=") in new stack
-- Executing [s@macro-hangupcall:26] GotoIf("SIP/200-00000001", "1?skiprg") in new stack
-- Goto (macro-hangupcall,s,29)
-- Executing [s@macro-hangupcall:29] GotoIf("SIP/200-00000001", "1?skipblkvm") in new stack
-- Goto (macro-hangupcall,s,32)
-- Executing [s@macro-hangupcall:32] GotoIf("SIP/200-00000001", "1?theend") in new stack
-- Goto (macro-hangupcall,s,34)
-- Executing [s@macro-hangupcall:34] Hangup("SIP/200-00000001", "") in new stack
== Spawn extension (macro-hangupcall, s, 34) exited non-zero on 'SIP/200-00000001' in macro 'hangupcall'
== Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/200-00000001'
 
THIS IS LOG FILE



[Feb 3 07:14:07] VERBOSE[3130] netsock2.c: == Using SIP RTP TOS bits 184
[Feb 3 07:14:07] VERBOSE[3130] netsock2.c: == Using SIP RTP CoS mark 5
[Feb 3 07:14:07] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:1] Answer("SIP/200-00000001", "") in new stack
[Feb 3 07:14:07] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:2] AGI("SIP/200-00000001", "googletts.agi,"Say something in English, when done p$
[Feb 3 07:14:07] VERBOSE[3490] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[Feb 3 07:14:07] VERBOSE[3490] res_agi.c: -- Playing '/tmp/6be952445fa092f54aa606501ac6c1b9' (escape_digits=) (sample_offset 0)
[Feb 3 07:14:11] VERBOSE[3490] res_agi.c: -- <SIP/200-00000001>AGI Script googletts.agi completed, returning 0
[Feb 3 07:14:11] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:3] AGI("SIP/200-00000001", "speech-recog.agi,en-US") in new stack
[Feb 3 07:14:11] VERBOSE[3490] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/speech-recog.agi
[Feb 3 07:14:11] VERBOSE[3490] res_agi.c: -- <SIP/200-00000001>AGI Script speech-recog.agi completed, returning 0
[Feb 3 07:14:11] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:4] NoOp("SIP/200-00000001", "= Script returned: , , , =") in new stack
[Feb 3 07:14:11] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:5] GotoIf("SIP/200-00000001", "0?success:fail") in new stack
[Feb 3 07:14:11] VERBOSE[3490] pbx.c: -- Goto (from-internal,1235,12)
[Feb 3 07:14:11] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:12] AGI("SIP/200-00000001", "googletts.agi,"Failed to get speech data.",en") in $
[Feb 3 07:14:11] VERBOSE[3490] res_agi.c: -- Launched AGI Script /var/lib/asterisk/agi-bin/googletts.agi
[Feb 3 07:14:11] VERBOSE[3490] res_agi.c: -- Playing '/tmp/1c0c50156168e6127c66f71b7858c3f9' (escape_digits=) (sample_offset 0)
[Feb 3 07:14:13] VERBOSE[3490] res_agi.c: -- <SIP/200-00000001>AGI Script googletts.agi completed, returning 0
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [1235@from-internal:13] Hangup("SIP/200-00000001", "") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: == Spawn extension (from-internal, 1235, 13) exited non-zero on 'SIP/200-00000001'
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [h@from-internal:1] Macro("SIP/200-00000001", "hangupcall") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:1] GotoIf("SIP/200-00000001", "1?endmixmoncheck") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,9)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:9] NoOp("SIP/200-00000001", "End of MIXMON check") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:10] GotoIf("SIP/200-00000001", "1?nomeetmemon") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,15)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:15] NoOp("SIP/200-00000001", "MEETME_RECORDINGFILE=") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:16] GotoIf("SIP/200-00000001", "1?noautomon") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,18)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:18] NoOp("SIP/200-00000001", "TOUCH_MONITOR_OUTPUT=") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:19] GotoIf("SIP/200-00000001", "1?noautomon2") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,25)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:25] NoOp("SIP/200-00000001", "MONITOR_FILENAME=") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:26] GotoIf("SIP/200-00000001", "1?skiprg") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,29)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:29] GotoIf("SIP/200-00000001", "1?skipblkvm") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,32)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:32] GotoIf("SIP/200-00000001", "1?theend") in new stack
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Goto (macro-hangupcall,s,34)
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: -- Executing [s@macro-hangupcall:34] Hangup("SIP/200-00000001", "") in new stack
[Feb 3 07:14:13] VERBOSE[3490] app_macro.c: == Spawn extension (macro-hangupcall, s, 34) exited non-zero on 'SIP/200-00000001' in macro 'hangupcall'
[Feb 3 07:14:13] VERBOSE[3490] pbx.c: == Spawn extension (from-internal, h, 1) exited non-zero on 'SIP/200-00000001'
[Feb 3 07:15:01] VERBOSE[2965] asterisk.c: -- Remote UNIX connection
 
you set language en

do you talk in english ?

If you set en as language and you talk in spanish or german or italian, google do not undersand and return fail. On the other hand is possible that not all packages ar installed. Check http://zaf.github.com/asterisk-speech-recog/ to be sure you install everyting !!
 
i talk in english

but the asterisk no give me time to talk

when i dial 1235 the asterisk say "Say something in English" and not waiting that i talk

the asterisk immediately say "Failed to get speech data"
 
try this in extension_custom,conf



[test]
exten => 2255,1,Answer()
exten => 2255,2,agi(googletts.agi,"Say me something .",en)
exten => 2255,3(record),agi(speech-recog.agi,en-US)
exten => 2255,4,Noop(= Script returned: ${status} , ${id} , ${confidence} , ${utterance} =)
exten => 2255,n,agi(googletts.agi,"The resturn status is",en)
exten => 2255,n,agi(googletts.agi,${status},en)
exten => 2255,n,agi(googletts.agi,"The confidence is",en)
exten => 2255,n,agi(googletts.agi,${confidence},en)
exten => 2255,5,agi(googletts.agi,"You said",en)
exten => 2255,n,agi(googletts.agi,${utterance},en)
exten => 2255,n,hangup
 
Great job.

About google tts, it's amazing. :laugh:
Speech recog , not tested yet.

Regards
 
So i have a new project where i have to do text to speech with a dutch language.
The interface should be simple and i was thinking of a webpage where the data can be inserted. Does anyone have experience with engines of similar setups?
I will get started this week and if someone responds to this thread, it would be very much appreciated if i could get some valuable information.

THANK YOU!
 
You can use speech to text in your input form, then you can save all in a DB. When you retrive the information the output coul be read by the text to speech engine.

Let me know something more about your projet
 
Hi all.

Achille... always impatient. :laugh:

I already sent this way at Elastix team to make somethink with GoogleTTS, and change the current Text 2 Wav page for have a choice somewhere between Festival, GoogleTTS, and why not Swift, the all, into the same page.
I had hear that google_tts was possible and there had this kind of stuff. But no sound of feedback to realise this way.

If this kind of project should be done, then maybe try to send a mail into dev mailing list, to know if a such module is interesting for Elastix and how to integrate it.

Remember that we are into the community. In this case, let try to provide this new function in Elastix distro.
Only Elastix team is able to approve this function or not, for any reason.

I think it should be easy to integrate this function into Text 2 Wav module.
All is there to do it. ;)

I hope that such function will coming soon.

Regards
 
Not Recording but Text 2 way of course. :laugh:
 
i fix my problem

i install flac.rpm
and run update

yum update --nogpgcheck

now in english is work fine

what change i need to work with this in hebrew
 
I'd like to make a new directory module that use googleSTT, I mean i'd like to have a dialplan function that work like this:

dial 2525 (for example)
1) googleTTS say "Tell me the name you are looking for"
2) then take the audio and send it to google STT that return te text
3) search in asterisk phone book for the name given
4) return something like "Do you want to call Arfio ? if yes dial 1 or say YES. If not dial 2 or say NO"
5) if yes dial the Arfio's extension, if no goto 1

I think this could be interesting for all Elastix comunity

What do you think about ?
 
danardf said:
Great job.

About google tts, it's amazing. :laugh:
Speech recog , not tested yet.

Regards

Yes, This is could be helpful.. Let me know the full details..
___________________
Transcribing service
 
Hi and welcome to our Elastix forum. :)

Yes, This is could be helpful.. Let me know the full details..
Full details?
I had followed only the process install, that's all. What else!....

Hmm a friend had a problem into the script with, like for example.

Before:
Code:
# Convert mp3 file to 16bit 8Khz mono raw #
system($mpg123, "-q", "-w", "$tmpname.wav", $tmpname) == 0
or die "$name $mpg123 failed: $?\n";
system($sox, "$tmpname.wav", "-r", $samplerate, "-t", "raw", "$tmpname.$fexten") == 0
or die "$name $sox failed: $?\n";

After:
Code:
# Convert mp3 file to 16bit 8Khz mono raw #
system("/usr/local/bin/mpg123, "-q", "-w", "$tmpname.wav", $tmpname) == 0
or die "$name $mpg123 failed: $?\n";
system("/usr/bin/sox", "$tmpname.wav", "-r", $samplerate, "-t", "raw", "$tmpname.$fexten") == 0
or die "$name $sox failed: $?\n";

Googletts works on Elastix 1.6 and 2.2.0.

That's all from my side, because the process install, didn't gave any problem.
Side my friend yes.

Regards
 
Status
Not open for further replies.

Forum statistics

Threads
111,858
Messages
589,427
Members
164,698
Latest member
RRusev