Skip to content

Latest commit

 

History

History
47 lines (21 loc) · 1.84 KB

README.md

File metadata and controls

47 lines (21 loc) · 1.84 KB

ChatBot Tá Lendo

ChatBot Tá Lendo (literally translating to 'ChatBot Is Reading') is a Kotlin android app using Google Cloud Text To Speech API and SSML to read an input text. The app was built to test Google Cloud Text To Speech API in Brazilian Portuguese.

What's the idea?

  • Read the user's input from the provided text field.
  • Send an asynchronous POST request to Google Cloud TTS API using retrofit2 and rxjava to receive an audio version of the user's input.
  • Parse the API response to extract the base64-encoded audio file sent from TTS API.
  • Decode the string received into ArrayByte and save it in an MP3 file in the internal storage of the phone.
  • Play the file saved using Android MediaPlayer library.

System Setting

  • Download Android Studio with the Kotlin plugin.
  • Clone the repository locally.
  • Open the project in android studio.
  • Set a simulator if you haven't already. Run the code.
  • Enter text and hit "L?" to read it.

For beginners:

  • Technologies: Read more about Kotlin and its relationship to Java here.
  • Front-end: More about the design and building of Android Apps here.
  • Networking: Concepts of networking in Android. About retrofit2 and rxjava2 libraries here.
  • Audio: Save files in Kotlin. More about MediaPlayer class in Kotlin here

Notes:

This app currently uses the app build of Wiki Search Demo.