<img alt="" src="https://secure.heat6have.com/191694.png" style="display:none;">

SPEAK THE MEANING OF A WORD USING MENDIX LOWCODE

Explore the power of integrating Python with Mendix to create a unique dictionary that speaks word meanings aloud, enhancing user experience and accessibility.


EvonSys_Speak the meaning of a word

Mendix is a low-code platform that allows businesses to build, integrate, and deploy applications rapidly. Python, on the other hand, is a versatile programming language known for its simplicity and readability. Integrating Mendix with Python can be a powerful combination, leveraging the strengths of both platforms for various purposes, such as extending Mendix applications with custom functionality, data analysis, machine learning, or connecting to external services. 

Starting a project to build a dictionary with a twist! Instead of just displaying definitions, ours will speak to them aloud. Who says dictionaries are outdated? Let's bring them into the digital age! 

In a Mendix project, integrating a feature to speak the meaning of words could enhance user experience and accessibility. 

  • Enhanced User Experience: Providing spoken definitions of words enhances the overall user experience by catering to different learning styles and preferences. Users can access information audibly, which can be especially helpful for those with visual impairments or learning disabilities. 

  • Language Learning: For language learning applications or educational platforms, the ability to hear spoken definitions can aid in vocabulary acquisition and pronunciation. 

  • Innovative Functionality: Implementing speech synthesis showcases the innovative capabilities of the Mendix platform and adds value to the application by offering a unique and interactive feature.  

  • Improved Accessibility: Speech synthesis makes the application more accessible to users with disabilities, ensuring compliance with accessibility standards and regulations. It allows individuals with visual impairments to access content effectively, promoting inclusivity and equal access to information. 

What do we need? 

In this blog, we will explore the steps of integrating Python with Mendix to achieve the Required Result. 

  1. Download and Install Python 3.8 or above. 

  2.  Mendix 10.00 Version  

  3. Community Commons Module 

  4. Encryption Module

  5. Autoload more Widget 

Step 1: Using Python IDE, implement the logic using Py Dictionary where it displays the meaning of the Word. 

Step 2: Create two entities with the name ‘Text’ as Persistable Entity and ‘User word’ as Non-Persistable Entity. 

  

Step 3: Create a Java Action with the name “Dictionary” and mention the input and output parameters as in the below image. Here we are creating a constant as “File Name”, through which we are passing our python file “test.py”. 

Constant Declaration

Java Action “Dictionary”: We are passing two parameters to the Java action and returning the meaning of words as string. 

The Code for "Dictionary" Java Action 

Step 4: Create a Microflow (ACT_ Retrieve Meaning) to call the Java Action and we are retrieving the Meaning in the form of a String, so we are splitting it using Split Java action which is reusable and implemented in Community Commons Module. 

Step 5: Create a Nanoflow which retrieves the ‘List Of Words’ and uses Text to Speech JavaScriptAction to speak it.  

JavaScriptAction for Text-to-Speech 

Step 6: Here, we are implementing Different Features like “Speak” button which allows the user to speak the word and “Stop” button to stop Speech Synthesis. And “Reset” button to reset the displayed data. 

  • Speak Button: Create a nanoflow and JavaScriptAction to implement logic for speak functionality which captures the voice of User. 

  • Nanoflow for Speak button: When the user clicks or activates the Speak button, it allows the user to speak instead of typing and then it captures the voice of user and displays the meaning. 

JavaScriptAction for Speech _To_ Text

  • Stop Button: Create a Nanoflow and JavaScriptAction to implement the logic to stop the speech synthesis. 

  • Nanoflow for Stop button: When the user clicks or activates the stop button, It works like a barrier to the speech synthesis i.e. when the user does not need to listen to spoken words, this logic works perfectly and stops the speech synthesis. 

 

JavaScriptAction for Stop Speech Synthesis

  • Reset Button: Create a Microflow to implement the logic for resetting of data which clears the recently displayed data.

  • Microflow for Reset Button: When a user clicks or activates the reset button, it triggers a predefined action that typically involves clearing memory. 

Microflow ACT_ Retrieve History: This Microflow runs automatically when the main page loads and it displays all the previous data retrieved by the user. 

Finally, the Main page where we implemented all the logics. Create the blank page, set the layout to “Responsive Layout Certificate (Encryption) “and drag the data view and connect it to “User word” entity and inside data view drag the list view and connect it to the microflow called “ACT_ Retrieve History" which displays the previous data the user has searched for. And Add “Autoload more” widget below the list view to display previous data. 

Get in touch to know more

Similar posts

Get notified on new marketing insights

Be the first to know about new B2B SaaS Marketing insights to build or refine your marketing function with the tools and knowledge of today’s industry.