Text-Style Lip-Sync with Voices - Could This Work?

Started by Akril15, Fri 22/04/2011 18:19:53

Previous topic - Next topic

Akril15

I was experimenting with AGS's various lip-syncing features recently in an attempt to create a sort of passable lip-sync with Lucasarts-style speech (Calin Leafshade posted a code where Pamela's files could be used to do this, but I've been having some problems with Pamela, so I'm trying to find ways to work without it at the moment). I thought that turning the text-to-speech feature on would result in a reasonable facsimile of lip-sync. However, when I tried displaying a voice file along with a line of text, instead of "reading out" the text, my character's mouth just animated using the default loop.

This got me thinking -- is it possible to create a function where both text and speech appear AND the text is "read out" by AGS? Perhaps something like this:

Code: ags
cChar1.Say("Hey, it looks like I'm actually speaking this line!"); //this character reads out the line, but the text he reads is printed in an invisible font
cChar2.Say("&1 Hey, it looks like I'm actually speaking this line!"); //while THIS character does the actual voice, and the text for HIS line is visible


This is just an idea I had and not an actual request, but I just wanted to know if something like this would be possible.

Calin Leafshade

theoretically possible, logistically complicated.

You'd need to make the text-to-speech also create phonemes and return them to AGS.

I'm sure there are T->S libraries that can do this but they would have to be integrated into AGS.

GarageGothic

#2
You could try smiley's wonderful LipSync Manager editor plugin. It works wonderfully, and as you say, Pamela hates its user.

Edit: Sorry, the plugin link is dead, it turns out. I've found what I think is the latest released version (the file date matches the date of the plugin thread) and uploaded it here.

Akril15

Quote from: Calin Leafshade on Fri 22/04/2011 18:38:10
theoretically possible, logistically complicated.

You'd need to make the text-to-speech also create phonemes and return them to AGS.

I'm sure there are T->S libraries that can do this but they would have to be integrated into AGS.
I'm not sure I understand -- are you saying that I'd have to somehow implement an external text-to-speech program? If so, I'm a little puzzled by that, since AGS already has a text-to-speech capability; it just doesn't work with voice clips, for some reason.

Quote from: GarageGothic on Sat 23/04/2011 09:04:23
You could try smiley's wonderful LipSync Manager editor plugin. It works wonderfully, and as you say, Pamela hates its user.

Edit: Sorry, the plugin link is dead, it turns out. I've found what I think is the latest released version (the file date matches the date of the plugin thread) and uploaded it here.
Wow, this looks great! I attempted to download that plugin in the past, but that dead link made me give up and start looking for alternate solutions. Thank you very much for re-uploading it.

Grundislav

This is something I'm very interested in.  If you manage to get some results, please let me know!

Akril15

Quote from: Grundislav on Sun 24/04/2011 03:43:36
This is something I'm very interested in.  If you manage to get some results, please let me know!
Okay -- I doubt that I'll be able to come up with any solutions of my own, though. I've done a little bit of experimenting with Strings and a bit of tinkering with some variations on a great script that Khris provided me with from this thread, but SayBackground has turned out to be a hurdle I just can't get over. It seems to be the only way I can get two lines of speech to appear simultaneously, but if I use it with the "read out but not spoken" line, the Say command following it (the "spoken in an invisible font" line) immediately removes it (setting game.bgspeech to 1 doesn't fix this, strangely). Alternately, if I have the "spoken in an invisible font" line appear as a SayBackground command before the "read out but not spoken" line, I never hear the voiced line.

(Again, I'm not desperately in need of this sort of thing, I just wanted to throw the idea out there and mention my own attempts to make it work as well.)

GarageGothic

I think Calin's module is the only way to get properly lipsynced LucasArts speech at the moment. Normal Lucas-style speech doesn't use PAM files.

As for background speech, just use a GUI label to display the text instead. I've been doing this for lucas-style animation but subtitle style text and it works fine. Make the GUI visible, run the invisible-font Say command, then make GUI invisible (since Say is a blocking function you don't need to implement a timer or anything). Of course to fake lucas-style display your custom speech function would also have to position the GUI above the head of the character, taking screen edges and GUI width into consideration, and set the label text color to the character speech color.

SMF spam blocked by CleanTalk