3

I wanted to create a talking avatar in android, with text to speech converting capability, but haven't come across any viable tutorial or a place to start yet.

Here is some info about the Android Text To Speech Class, which can convert any text we type into the corresponding voice/ speech in different languages.

Is there a way to add a face to this and have the approximate lip movements required?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
Lakshmi Narayanan
  • 5,220
  • 13
  • 50
  • 92
  • I am also try to implement the same, but i dont know where to start that. Does that work for you @Lakshmi Narayanan – Kartheek Aug 22 '16 at 06:32
  • @Kartheek I got it working. Creating few images with approx lip synchs for the visually most significant alphabets and word combos (you can google to find them), and then add the images as frames into the animation according to the letters from words, then run it. – Lakshmi Narayanan Sep 07 '16 at 15:41

1 Answers1

1

Here is a list of avatar engines, but as you can see many are super expensive. Most of these require Flash, which isn't really compatible with Android, so I don't think those one will work for you: http://aidreams.co.uk/forum/index.php?page=avatar_engines#.VhGyvLR--CQ

Update: This one seems to be in active development, and they say they are working on a web version, which I assume won't use Flash, because it is becoming out of date, so maybe it'll work for you. Right now it runs on Windows and only costs $120. It can do speech recognition and text to speech. http://www.nextos.com/

Update2: Since you're just doing this for practice maybe this will work for you. Just draw some basic graphics for the face. You can use this to help you convert text to phonemes: text to phonemes converter Then use this guide to help you convert phonemes to different lip shapes: http://animation.about.com/od/flashanimationtutorials/a/animationphonem.htm

To draw things you use a SurfaceView (https://developer.android.com/guide/topics/graphics/2d-graphics.html#on-surfaceview).

Then the methods in Canvas (https://developer.android.com/reference/android/graphics/Canvas.html) like drawArc() will help you make the shapes.

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
geokavel
  • 619
  • 4
  • 12
  • The last update is probably the most relevant to you. – geokavel Oct 04 '15 at 23:51
  • for converting text to phonemes, I can use the android TTS directly. Once I create the lip synchs for phonemes, how can I add it to android? – Lakshmi Narayanan Oct 10 '15 at 12:03
  • I think you have to make the Graphics yourself. – geokavel Oct 12 '15 at 00:43
  • 1
    Maybe you can use SVIEngine (made by Samsung). It can do Sprite animation https://github.com/samsung/SVIEngine/ – geokavel Oct 12 '15 at 00:53
  • please tell me if am on the right track. I have to use canvas, draw graphic on views, frame by frame and appropriately time them according to the text entered? – Lakshmi Narayanan Oct 14 '15 at 21:27
  • Yes , the timing is going to be the hard part. The best you can do is call tts.speak word by word, but that will still only approximate. See the UtteranceProgressListener for how to queue up words on after another. http://developer.android.com/reference/android/speech/tts/TextToSpeech.html#setOnUtteranceProgressListener(android.speech.tts.UtteranceProgressListener) – geokavel Oct 14 '15 at 23:39
  • Or maybe you can try calling speak syllable-by-syllable and inputting the actual phonemes. I dont know if that works though. – geokavel Oct 14 '15 at 23:51
  • how do I do that animation in android? Property animation? I have the graphics drawn separately and saved as images. Now I have to animate them frame by frame. Am I still on the right track? Instead of using canvas and surface view to draw, I drew it using Photoshop and other software. Now with the set of images, how can I animate in android? – Lakshmi Narayanan Oct 18 '15 at 16:44
  • 1
    SVIEngine or AnimationDrawable: http://developer.android.com/reference/android/graphics/drawable/AnimationDrawable.html – geokavel Oct 18 '15 at 17:09
  • I think AnimationDrawable will be sufficient. Let me know if you need help. – geokavel Oct 18 '15 at 17:14
  • @LakshmiNarayanan did you get your solutions? would me mind proving more information to achieve this. I'm trying to do the same – Dilip Jul 29 '21 at 15:16