Hi, I'm working on a muiti-lingual say api for ivr programmers to be able to generate audio for saying numbers, counting items or expressing amounts of things such as currency. I'd like some input from anyone who has some ideas on how to make sure we cover all bases. The basic idea is that we will have an api where each new language/implementation would provide it's own version of this function. switch_status_t say(char *tosay, switch_say_gender_t gender, switch_say_type_t type, switch_say_method_t method, switch_input_callback_function_t dtmf_callback, void *buf, uint32_t buflen); The enums are described in http://www.freeswitch.org/eg/say_api.c the idea would be something like switch_say_handle_t *en; en = switch_say_load("en"); switch_ivr_play_file(session, NULL, "/sounds/youhave.wav", NULL, NULL, NULL, 0); en->say("1000", SSG_ANY, SSM_PRONOUNCED, SST_MESSAGES, NULL, NULL, 0); switch_ivr_play_file(session, NULL, "/sounds/msgs.wav", NULL, NULL, NULL, 0); Thoughts? Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@66.250.68.194 iax:guest@66.250.68.194/888 googletalk:freeswitch@gmail.com pstn:213-799-1400 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
We have a system in Bayonne that does this that is called phrasebook, and the recorded audio samples it uses are also under the GNU GPL. Anthony Minessale wrote:
Hi,
I'm working on a muiti-lingual say api for ivr programmers to be able to generate audio for saying numbers, counting items or expressing amounts of things such as currency. I'd like some input from anyone who has some ideas on how to make sure we cover all bases.
The basic idea is that we will have an api where each new language/implementation would provide it's own version of this function.
switch_status_t say(char *tosay, switch_say_gender_t gender, switch_say_type_t type, switch_say_method_t method, switch_input_callback_function_t dtmf_callback, void *buf, uint32_t buflen); The enums are described in http://www.freeswitch.org/eg/say_api.c
the idea would be something like
switch_say_handle_t *en;
en = switch_say_load("en");
switch_ivr_play_file(session, NULL, "/sounds/youhave.wav", NULL, NULL, NULL, 0); en->say("1000", SSG_ANY, SSM_PRONOUNCED, SST_MESSAGES, NULL, NULL, 0); switch_ivr_play_file(session, NULL, "/sounds/msgs.wav", NULL, NULL, NULL, 0);
Thoughts?
Anthony Minessale II
FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/
AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference sip:888@66.250.68.194 iax:guest@66.250.68.194/888 googletalk:freeswitch@gmail.com pstn:213-799-1400
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
------------------------------------------------------------------------
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
The idea is great! OpenPBX seems to have one something similar, but it's unfortunately GPL. BTW, SSM_ITTERATED is misspelled. What would be the difference between SSM_ITERATED and SSM_PRONOUNCED? Nikolay Kolev _____ From: Anthony Minessale [mailto:anthmct@yahoo.com] Sent: Friday, December 15, 2006 3:09 PM To: freeswitch-dev@lists.freeswitch.org; freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-dev] C SAY API Hi, I'm working on a muiti-lingual say api for ivr programmers to be able to generate audio for saying numbers, counting items or expressing amounts of things such as currency. I'd like some input from anyone who has some ideas on how to make sure we cover all bases. The basic idea is that we will have an api where each new language/implementation would provide it's own version of this function. switch_status_t say(char *tosay, switch_say_gender_t gender, switch_say_type_t type, switch_say_method_t method, switch_input_callback_function_t dtmf_callback, void *buf, uint32_t buflen); The enums are described in http://www.freeswitch.org/eg/say_api.c the idea would be something like switch_say_handle_t *en; en = switch_say_load("en"); switch_ivr_play_file(session, NULL, "/sounds/youhave.wav", NULL, NULL, NULL, 0); en->say("1000", SSG_ANY, SSM_PRONOUNCED, SST_MESSAGES, NULL, NULL, 0); switch_ivr_play_file(session, NULL, "/sounds/msgs.wav", NULL, NULL, NULL, 0); Thoughts? Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@66.250.68.194 iax:guest@66.250.68.194/888 googletalk:freeswitch@gmail.com pstn:213-799-1400 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
You are really going to need some feedback about this one. Its been a terribly long time, and i have forgotten most of the issues we faced.. but when we ported a unified messaging product many years ago to some of the eastern languages. It was almost impossible to abstract this concept out. Abstracting something like speaking a URL, Phone number, Numeric string is perfectly attainable... but constructing a useful working sentence is much more complicated.. given "You have 1000 messages", in english. may need to say "1000 messages you have", before it makes any sense in Chinese or Piglatin or whatever. In which case, you end up having to write seperate IVR code for each language anyway. and having a "multi-lingular say API" is of extremely limited usefulness. I am not bilingual.. heck i never did any good in English class either. Im not trying to throw poo on the idea.. just skeptical about how useful this may turn out, for anything but a handful of commonly constructed languages. ----- Original Message ----- From: Nikolay Kolev To: freeswitch-dev@lists.freeswitch.org ; freeswitch-users@lists.freeswitch.org Sent: Saturday, December 16, 2006 6:47 PM Subject: Re: [Freeswitch-users] [Freeswitch-dev] C SAY API The idea is great! OpenPBX seems to have one something similar, but it's unfortunately GPL. BTW, SSM_ITTERATED is misspelled. What would be the difference between SSM_ITERATED and SSM_PRONOUNCED? Nikolay Kolev ------------------------------------------------------------------------------ From: Anthony Minessale [mailto:anthmct@yahoo.com] Sent: Friday, December 15, 2006 3:09 PM To: freeswitch-dev@lists.freeswitch.org; freeswitch-users@lists.freeswitch.org Subject: [Freeswitch-dev] C SAY API Hi, I'm working on a muiti-lingual say api for ivr programmers to be able to generate audio for saying numbers, counting items or expressing amounts of things such as currency. I'd like some input from anyone who has some ideas on how to make sure we cover all bases. The basic idea is that we will have an api where each new language/implementation would provide it's own version of this function. switch_status_t say(char *tosay, switch_say_gender_t gender, switch_say_type_t type, switch_say_method_t method, switch_input_callback_function_t dtmf_callback, void *buf, uint32_t buflen); The enums are described in http://www.freeswitch.org/eg/say_api.c the idea would be something like switch_say_handle_t *en; en = switch_say_load("en"); switch_ivr_play_file(session, NULL, "/sounds/youhave.wav", NULL, NULL, NULL, 0); en->say("1000", SSG_ANY, SSM_PRONOUNCED, SST_MESSAGES, NULL, NULL, 0); switch_ivr_play_file(session, NULL, "/sounds/msgs.wav", NULL, NULL, NULL, 0); Thoughts? Anthony Minessale II FreeSWITCH http://www.freeswitch.org/ ClueCon http://www.cluecon.com/ AIM: anthm MSN:anthony_minessale@hotmail.com JABBER:anthony.minessale@gmail.com IRC: irc.freenode.net #freeswitch FreeSWITCH Developer Conference sip:888@66.250.68.194 iax:guest@66.250.68.194/888 googletalk:freeswitch@gmail.com pstn:213-799-1400 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.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
On Sun 17 Dec 2006 08:00, Matt Porter wrote:
You are really going to need some feedback about this one. Its been a terribly long time, and i have forgotten most of the issues we faced.. but when we ported a unified messaging product many years ago to some of the eastern languages. It was almost impossible to abstract this concept out.
Abstracting something like speaking a URL, Phone number, Numeric string is perfectly attainable... but constructing a useful working sentence is much more complicated..
given "You have 1000 messages", in english.
may need to say "1000 messages you have", before it makes any sense in Chinese or Piglatin or whatever.
You are correct that the linguistic typology of a language is important. The majority of the worlds languages (At least many of the older ones) are SOV, however a few imporant ones like English, Romance Languages and Chinese are SVO. VSO is much less common, although some variants of Arabic and those crazy Irish use it.. (See http://en.wikipedia.org/wiki/Linguistic_typology for more info) Unfortunately that is not the only issue however. Turkish for example (the only language other than English that I am close to fluent in at present) has no concept of gender. (You don't specify someone as "he" or "she", simply as "that"). On the other hand French has a gender for every object, not just living things! The structure of pronouncing numbers also varies of course... Do you pronounce "13" as "thirteen" or as "ten three". What about "113" and "1113"? (Actually English probably has the most insane rules for pronouncing numbers of all the languages I have come across) Many languages also (Turkish included) require that both pronunciation and/or spelling be changed depending on the preceeding or following word to make the pronunciation more "musical" or smoother. ("K" gets changed to "soft G" for example to avoid "harshness" in the middle of a sentence). All of these little difference can crop up in surprisingly short, simple phrases making the job of such an API more complex that you might initially imagine :-) Cheers -- Peter Nixon http://www.peternixon.net/ PGP Key: http://www.peternixon.net/public.asc
Gender can even be more complex in some languages than others. While to the best of my knowledge, Romance languages do not have a concept of numbers matching gender with the object they are modifying, at least Hebrew (and possibly other Semitic languages) do have this concept. So if I say the "7 cars" versus "7 speakers", it comes out different - "shevA michoniyot" versus "shivAh ramkolim". Additionally, some languages might handle the order of quantity to object differently based upon the amount. Again, citing an example from Hebrew, if you say "1 speaker" the order is reversed - "ramkol eHad" (if you catch it, "ramkol" means "speaker" as in the one hooked up to your stereo). -- Yossi Neiman Cartis Solutions, Inc. - http://www.cartissolutions.com Peter Nixon wrote: <snip snip>
Unfortunately that is not the only issue however. Turkish for example (the only language other than English that I am close to fluent in at present) has no concept of gender. (You don't specify someone as "he" or "she", simply as "that"). On the other hand French has a gender for every object, not just living things! The structure of pronouncing numbers also varies of course... Do you pronounce "13" as "thirteen" or as "ten three". What about "113" and "1113"? (Actually English probably has the most insane rules for pronouncing numbers of all the languages I have come across) Many languages also (Turkish included) require that both pronunciation and/or spelling be changed depending on the preceeding or following word to make the pronunciation more "musical" or smoother. ("K" gets changed to "soft G" for example to avoid "harshness" in the middle of a sentence).
All of these little difference can crop up in surprisingly short, simple phrases making the job of such an API more complex that you might initially imagine :-)
Cheers
------------------------------------------------------------------------
I actually spent close to 6 months on this very problem back in 1999 before we even did the initial release of ACS. The solution we used in that (and later in Bayonne) was a phrase rules parser/description language which can manipulate sampled audio prompts (the phrasebook...) and has means of marking context of each component. The goal we were working toward was "describe/code once, speak anywhere" by having the rules parser execute against a plugin which would re-interpret the meaning of the rules description used in the phrase based on the language and location. As Peter notes there are many different language cases with gender, special case numbering rules, etc. Plural rules also can be complex, as well as ordering rules which will be different in different languages. Consider even the very simple case of these three possible prompts: "You have no messages waiting" "You have 1 message waiting" "You have 2 messages waiting" In this case we have both a zero substitute rule (no for 0), and a plural form rule case around "1", but even then these may all be unique in English... Peter Nixon wrote:
On Sun 17 Dec 2006 08:00, Matt Porter wrote:
You are really going to need some feedback about this one. Its been a terribly long time, and i have forgotten most of the issues we faced.. but when we ported a unified messaging product many years ago to some of the eastern languages. It was almost impossible to abstract this concept out.
Abstracting something like speaking a URL, Phone number, Numeric string is perfectly attainable... but constructing a useful working sentence is much more complicated..
given "You have 1000 messages", in english.
may need to say "1000 messages you have", before it makes any sense in Chinese or Piglatin or whatever.
You are correct that the linguistic typology of a language is important. The majority of the worlds languages (At least many of the older ones) are SOV, however a few imporant ones like English, Romance Languages and Chinese are SVO. VSO is much less common, although some variants of Arabic and those crazy Irish use it.. (See http://en.wikipedia.org/wiki/Linguistic_typology for more info)
Unfortunately that is not the only issue however. Turkish for example (the only language other than English that I am close to fluent in at present) has no concept of gender. (You don't specify someone as "he" or "she", simply as "that"). On the other hand French has a gender for every object, not just living things! The structure of pronouncing numbers also varies of course... Do you pronounce "13" as "thirteen" or as "ten three". What about "113" and "1113"? (Actually English probably has the most insane rules for pronouncing numbers of all the languages I have come across) Many languages also (Turkish included) require that both pronunciation and/or spelling be changed depending on the preceeding or following word to make the pronunciation more "musical" or smoother. ("K" gets changed to "soft G" for example to avoid "harshness" in the middle of a sentence).
All of these little difference can crop up in surprisingly short, simple phrases making the job of such an API more complex that you might initially imagine :-)
Cheers
------------------------------------------------------------------------
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (7)
-
Anthony Minessale
-
David Sugar
-
David Sugar
-
Matt Porter
-
Nikolay Kolev
-
Peter Nixon
-
Yossi Neiman