ML Composer: A Machine Learning ft Jetpack Compose Dev Story — Episode 2

Francesco Stranieri
Huawei Developers
Published in
2 min readDec 9, 2021

Text Translation

Hi Folks!

Prologue

In the previous episode We started with the Text Recognition feature, recognizing text from the picture taken by our camera.

https://medium.com/huawei-developers/ml-composer-episode-1-b52c842ff05e

Now It’s the time to understand that text!
Just imagine to be out of your country, into a restaurant that’s not having an English menu or into a local shop not so tourist friendly: nightmare!

The solution? Text Translation

Text Translation

The real-time translation service can translate text from the source language into the target language through the server on the cloud.

More info here
https://developer.huawei.com/consumer/en/doc/development/hiai-Guides/real-time-translation-0000001050040079

Project

How to run it on your Android device?

Just follow the preparation guide: https://developer.huawei.com/consumer/en/doc/development/hiai-Guides/config-agc-0000001050990353

UI

This time I was having fun using the animations!

  • Show up the available languages for Text Translation on Cloud
  • Show up the translated text
  • The list with all the available languages to use for the translation on Cloud

ViewModel

Result

Stay tuned for the next episode with another awesome Machine Learning superpower!!!
Bye Folks :}

--

--