VoIP Mailing List Archives
Mailing list archives for the VoIP community |
|
View previous topic :: View next topic |
Author |
Message |
brian at freeswitch.org Guest
|
|
Back to top |
|
|
mcollins at fcnetwork.com Guest
|
|
Back to top |
|
|
noah at allresearch.com Guest
|
Posted: Wed Oct 15, 2008 4:48 pm Post subject: [Freeswitch-users] Phrases and speech |
|
|
Hi,
I have a question about setting up speech in FS...
I'm far away from the default config, so I just want to add the
MINIMUM amount necessary to my config to enable speech.
My goal is to have some basic functions like "You have 3 dollars and
27 cents left".
(Do I need to build the cepstral code and modules?)
Can anyone help me with a simple, clean few lines of XML in the config
to enable this?
Thanks,
-N
_______________________________________________
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 |
|
Back to top |
|
|
mcollins at fcnetwork.com Guest
|
Posted: Wed Oct 15, 2008 4:48 pm Post subject: [Freeswitch-users] Phrases and speech |
|
|
Quote: | I'm far away from the default config, so I just want to add the
MINIMUM amount necessary to my config to enable speech.
My goal is to have some basic functions like "You have 3 dollars and
27 cents left".
|
Here's a snippet that I would use to manually create the above phrase,
mixing TTS and pre-recorded prompts:
<macro name="ivr-speak-balance">
<input pattern="(.*)">
<match>
<action function="playfile" data="voicemail/you-have.wav"/>
<action function="execute" data="sleep(50)"/>
<action function="speak-text" data="${num_dollars}"/>
<action function="execute" data="sleep(50)"/>
<action function="playfile" data="currency/dollars.wav"/>
<action function="execute" data="sleep(50)"/>
<action function="playfile" data="currency/and.wav"/>
<action function="execute" data="sleep(50)"/>
<action function="speak-text" data="${num_cents}"/>
<action function="execute" data="sleep(50)"/>
<action function="playfile" data="currency/cents.wav"/>
<action function="execute" data="sleep(50)"/>
<!-- you need to supply this next file! -->
<action function="playfile" data="left.wav"/>
</match>
</input>
</macro>
That demonstrates the way you can build phrases. However I believe that
there are more elegant ways of handling dollar amounts when using the
"say" action. Brian, can you confirm if "say" handles currency and if it
handles dollars/cents with correct plural/singular values?
Note: the above snippet could be in a file but it would need to be
included via conf/lang/en/en.xml or otherwise inserted into your config
inside of the <language></language> tags for whichever language(s) you
are using...
Quote: |
(Do I need to build the cepstral code and modules?)
|
If you are doing TTS then yes, you'll need Cepstral -OR- Flite, but not
both. You can build either one but don't enable them simultaneously on
modules.conf.xml or non-fun things will happen.
Quote: | Can anyone help me with a simple, clean few lines of XML in the config
to enable this?
|
Are you doing an IVR? Just confirming so that I can get a sense of what
you are trying to accomplish.
-MC
_______________________________________________
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 |
|
Back to top |
|
|
noah at allresearch.com Guest
|
|
Back to top |
|
|
noah at allresearch.com Guest
|
Posted: Wed Oct 15, 2008 8:15 pm Post subject: [Freeswitch-users] Phrases and speech |
|
|
Nice,
Do I have to build and/or install any additional modules?
It seems as if the demo relies on some macros that in turn rely on
specific language files. is there any more detail about working with
them.
For example, I see sound files in /usr/local/freeswitch/sounds/en/us/
callie/ascii/8000. Is this a good location, or do I need to move
them to somewhere that makes more sense? (I'm concerned about the
"8000" part of the path.)
Thanks,
-N
On Oct 15, 2008, at 1:33 PM, Michael Collins wrote:
_______________________________________________
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 |
|
Back to top |
|
|
brian at freeswitch.org Guest
|
Posted: Wed Oct 15, 2008 9:23 pm Post subject: [Freeswitch-users] Phrases and speech |
|
|
On Oct 15, 2008, at 6:03 PM, Noah Silverman wrote:
Quote: | Nice,
Do I have to build and/or install any additional modules?
It seems as if the demo relies on some macros that in turn rely on
specific language files. is there any more detail about working with
them.
|
First off I would look at the demo-ivr.xml phrase macros.
Quote: |
For example, I see sound files in /usr/local/freeswitch/sounds/en/us/
callie/ascii/8000. Is this a good location, or do I need to move
them to somewhere that makes more sense? (I'm concerned about the
"8000" part of the path.)
|
You can have files for all three rates we support 8000, 16000 and
32000..
example:
playback /usr/local/freeswith/sounds/test.wav
What we will do is look for /usr/local/freeswitch/sounds/$
{channel_rate}/test.wav
So if FreeSWITCH can't find a file to match the rate it will fall back
to /usr/local/freeswitch/sounds/test.wav
/b
_______________________________________________
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 |
|
Back to top |
|
|
noah at allresearch.com Guest
|
Posted: Thu Oct 16, 2008 12:26 am Post subject: [Freeswitch-users] Phrases and speech |
|
|
Brian,
That really helped. I can now get FS to "say" some basic stuff.
Now I'm trying to play some specific sound files and am seeing an
error about unable to locate a file. It appears as if FS is not
appending the "en/us" part to the filename it is trying to open.
here are the relevant entries from the logfile:
switch_ivr_play_say.c:115 switch_ivr_phrase_macro() No language
specified - Using [en]
2008-10-15 22:07:04 [DEBUG] switch_ivr_play_say.c:260
switch_ivr_phrase_macro() Handle play-file:[voicemail/vm-youhave.wav]
(en:en)
2008-10-15 22:07:04 [ERR] mod_sndfile.c:175 sndfile_file_open() Error
Opening File [/usr/local/freeswitch/sounds/callie/voicemail/vm-
youhave.wav] [System error : No such file or directory.]
The actual file IS located at /usr/local/freeswitch/sounds/en/us/
callie/voicemail/8000/vm-youhave.wav
Any suggestions?
Thanks!!!
-N
On Oct 15, 2008, at 6:03 PM, Noah Silverman wrote:
Quote: | Nice,
Do I have to build and/or install any additional modules?
It seems as if the demo relies on some macros that in turn rely on
specific language files. is there any more detail about working with
them.
|
First off I would look at the demo-ivr.xml phrase macros.
Quote: |
For example, I see sound files in /usr/local/freeswitch/sounds/en/us/
callie/ascii/8000. Is this a good location, or do I need to move
them to somewhere that makes more sense? (I'm concerned about the
"8000" part of the path.)
|
You can have files for all three rates we support 8000, 16000 and
32000..
example:
playback /usr/local/freeswith/sounds/test.wav
What we will do is look for /usr/local/freeswitch/sounds/$
{channel_rate}/test.wav
So if FreeSWITCH can't find a file to match the rate it will fall back
to /usr/local/freeswitch/sounds/test.wav
/b
_______________________________________________
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
_______________________________________________
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 |
|
Back to top |
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|