Introduction 

In case of IOT devices which are designed to help patients who have speech issues, text to speech translation plays a great role in granting freedom to the patients. In such cases, the IOT devices can make use of the Text to Speech Api provided as a part of cognitive services and logic apps to translate the text to the speech. This article aims to set up a basic logic app flow which will use the text to speech translator API to convert the text to speech. In this scenario, the logic app accepts the text message over the REST API and sends back the detected language, it at the same time saves the converted speech on the file on the connected computer using on premises data gateway.

↑Back To Top 

What Are Logic Apps? 

Logic Apps are a piece of integration workflow hosted on Azure which is used to create scale-able integrations between various systems.These are very easy to design and provide connectivity between various disparate systems using many out of the box connectors as well as with the facility to design custom connectors for specific purposes. This makes integration easier than ever as the design aspect of the earlier complex integrations is made easy with minimum steps required to get a workflow in place and get it running. 

↑Back To Top 

What Are Cognitive Services? 

As per Microsoft:

"Microsoft Cognitive Services (formerly Project Oxford) are a set of APIs, SDKs and services available to developers to make their applications more intelligent, engaging and discoverable. Microsoft Cognitive Services expands on Microsoft’s evolving portfolio of machine learning APIs and enables developers to easily add intelligent features – such as emotion and video detection; facial, speech and vision recognition; and speech and language understanding – into their applications. Our vision is for more personal computing experiences and enhanced productivity aided by systems that increasingly can see, hear, speak, understand

↑Back To Top 


Logic App Design 

Following are the steps that need to completed to create the logic app.

  1. Create an empty logic app as shown in the following screen shot.





  2. Select Request Response Template.



  3. Configure the Request trigger as shown. 



  4. Select the Detect Language action from the list of available action. The text received in the request is then fed to this action as input parameter.



  5. Select Text To Speech from the list of the actions. The text from the request and the language code detected from previous step. Refer Sample screen shot below.





  6. Select Create File from the list of the available actions and configure the File Connection as per the following reference screen shot. It is necessary that the On Premises Data Gateway is running so that the logic app can save the converted speech.



  7. Configure the create file action as shown below.



  8. Configure the response action as shown below.

  9. This completes the logic app design.

↑Back To Top 


Testing

Following test messages was fed to the Logic App.

  1. Hindi

    {
        "text" : "मेरा नाम मंडार है। मैं एक सॉफ्टवेयर इंजीनियर हूँ मैं माइक्रोसॉफ्ट प्रौद्योगियों पर काम करता हूं"
    }

    The response sent by the logic app is as follows.

    {
        "detectedlang": "hi"
    }
  2. English

    {
      "text" : "My Name is Mandar.I am a software engineer. I work on Microsoft technologies"
    }

    The response sent by the logic app is as follows.

    {
       "detectedlang": "en"
    }

The sample output files generated by the logic app are stored at the Output Files For Text To Speech Translator Logic App

↑Back To Top 


Conclusion

As evident from the walk through and the testing results, it can be concluded that it is very easy to set up a logic app that will accept the text input and deliver a speech output

↑Back To Top 


See Also

Following articles can be visited for extra reading related to the topic discussed above.

  1. Create Azure Logic App 
  2. Microsoft Azure: Building a Logic App 
  3. Logic Apps: Face Verification Using Microsoft Cognitive Services Face Api and Logic Apps
  4. Updating Users With Daily Weather Forecasts Using Logic Apps
  5. Logic App Resources Wiki Portal 

↑Back To Top 


References 

Following article was referred for details about Cognitive Services.

Cognitive Services Welcome Page 

↑Back To Top