Speech to Text Widget

Writing is not simple, especially when you must type thousands of words every day. The more typing, the more challenging it can be to maintain the writing’s effectiveness and caliber.

Javith baig
Mendix Community
Published in
3 min readDec 9, 2022

--

But when typing becomes too exhausting, I switch to speaking into a speech-to-text program. In addition to being simple and easy, talking your way through a document gives you the opportunity to move about, lie down, or stretch without interfering with your daily productivity. In fact, I think using Google Speech to Text is a better option than typing because it helps you think of more original ideas.

While Google is great, and there are also many other providers of speech-to-text, I decided to create my own widget and publish it to the Mendix Marketplace.

How it works

I built the widget with React Speech Recognition. It’s a React Hook that works with the Google Web Speech API to translate speech from your device’s mic into text. This text can then be read by your Mendix app and used to perform tasks.

Speech to Text — Mx Techies

You can read the full details of the widget on the Marketplace here:

https://marketplace.mendix.com/link/component/202535/MxTechies/Speech-to-Text

Configuring the widget

This widget uses SpeechRecognition API, which is currently only supported by Chrome browsers, however, it does not require any additional setup or API keys, and everything works out of the box.

You can use this widget with any other browser by providing an API key. To do this, activate the cross-browser option by clicking yes, then enter your API key in the space below the Google API key field. Now any browser can use your widget to convert speech to text.

By choosing the Text Area option Yes/No, you can also change from a text box to a text area.

How to get your Google API key

  1. Open the GCP console https://console.cloud.google.com/
  2. Select or create a new project
  3. Search for “Cloud Speech-to-Text API” and enable it
  4. Search for “Service accounts” and create a new service account
  5. Add a key to the service account, choose JSON format, download and safely save the key file

Conclusion

It’s my hope this widget will make it easier to convert speech to text in your Mendix Apps. I hope you download the widget and try it for yourself, and if you do I would love to hear your thoughts. Let me know here in the comments, or please leave a review on the Marketplace page.

Read more

From the Publisher -

If you enjoyed this article you can find more like it on our Medium page. For great videos and live sessions, you can go to MxLive or our community Youtube page.

For the makers looking to get started, you can sign up for a free account, and get instant access to learning with our Academy.

Interested in getting more involved with our community? Join us in our Slack community channel.

--

--

Javith baig
Mendix Community

Advanced Certified Mendix Developer, Quick learner and Good listener