Last Updated on July 1, 2023
Somewhere between 3.3 and 3.6 billion people use an Android smartphone these days.
That is a large market share, for an operating system, with a launch happening exactly 15 years ago, in September 2008.
Android has a market share of approximately 72% of all mobile operating systems globally.
This means that in all likelihood, your customers are using an Android phone, and making life easier for them should be on the top of your priority list.
One of the most sought after features on Android smartphones is the Speech-to-text feature.
If you have a chatbot on your mobile app, then your customers will want to speak to it and convert their speech to text.
Converting your Speech to Text on your Mobile SDK is a straightforward process, but, before we dive in, here are some of the reasons why you should have multi-language support in speech-to-text functionality.
Why do you need Speech-To-Text in Multiple Languages:
- Reach a global audience: Millions of people use Android devices, and their language also varies from region to region. If you provide multiple language support, you are attracting a wider user base from diverse backgrounds. This enhances the accessibility and usability of the device.
- Break language barriers: The digital divide is starting to disappear. Globalization is bringing people closer to each other. Language today is no longer a barrier to communication, thanks to technology. Enabling Speech-to-text in multiple languages is the first step in this direction.
- Language diversity: You may be reading this blog post in English, but a sizable portion of the world’s population does not speak the language. A lot of smartphone users will be willing to express themselves only in their native tongue. The speech-to-text feature enables them to communicate authentically.
- Market penetration: Developers want a wide user base for their apps. Smartphone developers are also always looking for ways to capture a large market share. Providing speech-to-text support in multiple languages means you are easily making inroads into markets where customers speak different languages.
- Championing inclusivity: If you have a speech-to-text feature in multiple languages, your company is seen as a team that promotes inclusivity. People who may not be proficient in one language can use the speech-to-text feature, empowering people from diverse backgrounds.
Steps involved in enabling Multiple language Speech to text feature
To enable multiple speech to text, add this code before opening a conversation.
You have to create a Hashmap and map the language code to the language.
You must have these languages added in Kompose Bot builder to enable multilingual functionality of bots.
Once you have created a map of languages, pass that to the KmSpeechToTextSetting class, along with some additional data like:
Map<String, String> language = new HashMap<>(); language.put("hi", "Hindi"); language.put("zh-hans", "Mandarin"); language.put("ms", "Malaysian"); language.put("en-US", "English"); KmSpeechToTextSetting.getInstance(context) .enableMultipleSpeechToText(true) .showLanguageCode(false) .sendMessageOnSpeechEnd(true) .setMultipleLanguage(language);
- enableMultipleSpeechToText() -> Enabling it will enable the multiple language selection feature.
- showLanguageCode() -> it will enable/disable whether to show language code in the UI
- sendMessageOnSpeechEnd() -> Enabling it will automatically send the message when user has stopped speaking
- setMultipleLanguage() -> you pass the map of languages here.
As you can see, if you click on the “language icon” at the bottom, you can select the language you want to convert your speech to.
And there you have it. How to add Speech-to-text in multiple languages in Android. Keep watching this space for iOS.
At Kommunicate, we envision a world-beating customer support solution to empower the new era of customer support. We would love to have you on board to have a first-hand experience of Kommunicate. You can signup here and start delighting your customers right away.