[Freeswitch-users] Adding Spanish support to say

Michael Collins msc at freeswitch.org
Wed Apr 22 14:07:54 PDT 2009

On Tue, Apr 21, 2009 at 5:17 PM, Michael Jerris <mike at jerris.com> wrote:

> sound_prefix?
> Mike

I can find no evidence of a sound prefix issue. Here's my language setup
from es.xml:
  <language name="es" sound-path="$${base_dir}/sounds/es/ar/elianna"
tts-engine="cepstral" tts-voice="callie">
    <X-PRE-PROCESS cmd="include" data="demo/*.xml"/> <!-- Note: this now
grabs whole subdir, previously grabbed only demo.xml -->
    <!--voicemail_en_tts is purely implemented with tts, we have the files
based one that is the default. -->
    <X-PRE-PROCESS cmd="include" data="vm/sounds.xml"/>  <!-- vm/tts.xml if
you want to use tts and have cepstral -->

base_dir is, of course, "/usr/local/freeswitch" and the
sounds/es/ar/elianna/ directory does indeed exist:
sh-3.2# cd /usr/local/freeswitch/sounds/es/ar/elianna/
sh-3.2# pwd

I also have the digits directories set up identically. I created 8000 and
16000 directories:
sh-3.2# cd /usr/local/freeswitch/sounds/es/ar/elianna/digits/8000
sh-3.2# ls


sh-3.2# cd /usr/local/freeswitch/sounds/es/ar/elianna/digits/16000
sh-3.2# ls

I'm calling with a headset connected to my Mac, using pa. I created
extension 12345 to test this:
  <extension name="spanish test">
    <condition field="destination_number" expression="^(12345)$">
      <action application="set" data="default_language=es"/>
      <action application="say" data="es number iterated $1"/>
      <action application="sleep" data="2000"/>
      <action application="say" data="es number iterated 987654321"/>
      <action application="hangup"/>

And here's the debug log when calling:

Too much to put it all here, but the highlights are:
EXECUTE portaudio/12345 set(default_language=es)
2009-04-22 14:00:29 [DEBUG] mod_dptools.c:748 set_function() portaudio/12345
SET [default_language]=[es]
EXECUTE portaudio/12345 say(es number iterated 12345)
2009-04-22 14:00:29 [NOTICE] switch_ivr.c:2012 switch_ivr_say() Using SAY
Interface es
2009-04-22 14:00:29 [NOTICE] mod_say_es.c:504 es_say() Using es callback
[tosay: 12345, type: 0, method: 2]
2009-04-22 14:00:29 [DEBUG] switch_ivr_play_say.c:993 switch_ivr_play_file()
Codec Activated L16 at 8000hz 1 channels 20ms
2009-04-22 14:00:30 [DEBUG] switch_ivr_play_say.c:1283
switch_ivr_play_file() done playing file

FYI, I manually added those two NOTICE lines in the source code as a
sanity-saver. :)
No matter what, it plays the English files even though it appears that the
"es" say module is there and available. No errors or warnings about missing
files so unless there's a silent failover I'd have to say that something
else is going on.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090422/ecb9a256/attachment-0002.html 

More information about the FreeSWITCH-users mailing list