Issue
When using Twilio’s <Gather> verb for speech recognition in a voice application, specifying the language as Hebrew (he-IL) results in Warning 13331: “language is not a supported language.” As a result, speech recognition falls back to English (en-US), and the recognized text is returned in English rather than Hebrew.
Product
Programmable Voice
Environment
Twilio Console
Cause
Twilio’s speech recognition engine expects the language code for Hebrew to be iw-IL (not he-IL). Using the incorrect language code (he-IL) triggers Warning 13331, indicating the language is unsupported. This causes Twilio to default to English for speech recognition.
Additionally, the option to set a global default Speech Recognition provider (such as Google) may not be visible in the new Twilio Console layout. However, specifying the correct language code is required regardless of the provider.
Resolution
To resolve this issue:
-
Update the Language Code in TwiML:
- Use
language="iw-IL"instead ofhe-ILin your<Gather>verb.
- Use
<Gather input="speech" language="iw-IL"> <!-- Your prompt here --> </Gather>
-
Specifying the Speech Provider (Optional):
- If you need to use Google as the speech provider, you can specify it directly in the
<Gather>verb using thespeechRecognitionattribute (if available in your account).
- If you need to use Google as the speech provider, you can specify it directly in the
<Gather input="speech" language="iw-IL" speechRecognition="google"> <!-- Your prompt here --> </Gather>
- Note: The ability to set a global default provider may not be available in all Console layouts. If you do not see this option, specifying the provider per
<Gather>is recommended.
-
Check for Console Updates:
- If you are unable to find the global Speech Provider setting, refer to the latest Twilio Voice documentation or reach out for further assistance.
Additional Information
- The language code
iw-ILis the correct ISO 639-1 code for Hebrew as used by Twilio and some speech recognition engines. The codehe-ILis not recognized by Twilio’s speech recognition. - Warning 13331 indicates an unsupported language code in the
<Gather>verb. - For a full list of supported languages and language codes, see the Twilio Gather Language Tags documentation.
- If you continue to experience issues after updating the language code, ensure your account has access to the desired speech provider or contact Twilio for further support.