adhearsion / ruby_speech

A ruby library for TTS & ASR document preparation
MIT License
101 stars 41 forks source link

[BUGFIX] Phone number grammar should only allow a single instance of '*'/'x' #20

Closed benlangfeld closed 11 years ago

benlangfeld commented 11 years ago

By request of @vindir. Need to check this is valid as per specifications, but not sure which spec covers this. @sfgeorge?

benlangfeld commented 11 years ago

From the VoiceXML spec:

Valid spoken inputs include phrases that specify a phone number. DTMF asterisk "*" represents "x". The result is a string containing a telephone number consisting of a string of digits and optionally containing the character "x" to indicate a phone number with an extension. For North America, a result could be "8005551234x789". If the field is subsequently used in with the interpret-as value "vxml:phone", it will be spoken as a phone number appropriate to the current language.

coveralls commented 11 years ago

Coverage Status

Coverage increased (+5.55%) when pulling 7c1db74786266307d2e5117a49e2edfa2eb17d97 on feature/phone_single_extension into aa126477e0b69903be9e1c033ddec717e473de84 on develop.

sfgeorge commented 11 years ago

Please see this recent change on my private repo. Very sorry for giving you old data. :(

benlangfeld commented 11 years ago

I'm pretty sure this change is still what you want, right @sfgeorge. The question is, what specification justifies it?

sfgeorge commented 11 years ago

Agreed. And I think that the excerpt that you quoted from VoiceXML spec is right.

benlangfeld commented 11 years ago

The problem is that the VoiceXML spec is not decisive either way...

Enviado via iPad

Em 3 Oct 2013, às 23:19, Stephen George notifications@github.com escreveu:

Agreed. And I think that the excerpt that you quoted from VoiceXML spec is right.

— Reply to this email directly or view it on GitHubhttps://github.com/benlangfeld/ruby_speech/pull/20#issuecomment-25672643 .

benlangfeld commented 11 years ago

So, in the absence of a spec on this, I'm just going to copy the behaviour of Voxeo Prophecy.

benlangfeld commented 11 years ago

I'll hold off on a bugfix release until @vindir can confirm there's no other issues from his testing.