Adding Speech to old games that doesn't support it anyway
Moderator: ScummVM Team
Adding Speech to old games that doesn't support it anyway
Sorry for my bad english, I'm Spanish,
Well, the idea came because I tought about trying to dub Maniac Mansion to Spanish some time ago. I work as a voice actor here in Spain, so it's a project from a fan and for fun, but with a minimum level of experience at least.
Well, the only option I have (I think) is Maniac Mansion Deluxe, that can manage speech packs, but I haven't found any of them to know how they work. But anyway, I also preffer the original version so it can work with any system that have a ScummVM port... an this means any system.
I know that it's near impossible to add speech to old games like Maniac Mansion, but... it's impossible to edit the source code of ScummVM and do it accept "speech packs" for game that doesn't support speech?
I try to explain my idea better.
I don't know exactly how ScummVM works, but when it interprets a game like Maniac Mansion, when a character is Speaking, some "flag" must be activated specifying who talks (at least for font color purposes) and which phrase does it say, I suppose.
If this works kind that way (which I don't know), may it be possible, the simplest and plainest way I can think of, to make scummvm play "character-phrase.wav", like 02-287.wav for character 2 phrase 287 when it says it?
Well, I through the idea away. Of course not asking for a official implementation, just asking if someone thinks it's possible or knows a good or better way to do that.
It may be a good way also to apply the speach of Monkey SE to old Monkey versions . This is the first step if I want to dub it to Spanish, any way!
Well, any ideas or comments are welcome
Well, the idea came because I tought about trying to dub Maniac Mansion to Spanish some time ago. I work as a voice actor here in Spain, so it's a project from a fan and for fun, but with a minimum level of experience at least.
Well, the only option I have (I think) is Maniac Mansion Deluxe, that can manage speech packs, but I haven't found any of them to know how they work. But anyway, I also preffer the original version so it can work with any system that have a ScummVM port... an this means any system.
I know that it's near impossible to add speech to old games like Maniac Mansion, but... it's impossible to edit the source code of ScummVM and do it accept "speech packs" for game that doesn't support speech?
I try to explain my idea better.
I don't know exactly how ScummVM works, but when it interprets a game like Maniac Mansion, when a character is Speaking, some "flag" must be activated specifying who talks (at least for font color purposes) and which phrase does it say, I suppose.
If this works kind that way (which I don't know), may it be possible, the simplest and plainest way I can think of, to make scummvm play "character-phrase.wav", like 02-287.wav for character 2 phrase 287 when it says it?
Well, I through the idea away. Of course not asking for a official implementation, just asking if someone thinks it's possible or knows a good or better way to do that.
It may be a good way also to apply the speach of Monkey SE to old Monkey versions . This is the first step if I want to dub it to Spanish, any way!
Well, any ideas or comments are welcome
There is already a project to add speech to the original Monkey Island. It doesn't use the Special Edition voices as that would breach copyright laws to distribute, but they have a team of voice actors specifically for this project.
http://speechproject.mixnmojo.com/
The game is played with this speech pack (although it is only work in progress at the moment) through ScummVM. This means that a similar project would probably be possible for Maniac Mansion. However it would probably take a lot of effort and technical expertise to implement.
The Monkey Island project requires an altered version of MONKEY1.000 to be released. This is possible legally I believe as the game will still not run without MONKEY1.001 (as it contains almost all the game). If, on the other hand, all the .LFL files of Maniac Mansion would need to be altered and redistributed, it would be a legal issue because it would require the distribution of the enitre game.
That's not to say that it isn't legally possible as a ScummVM feature if ScummVM's interpreter detected the prompts that make speech appear on screen. It could possibly use them to access audio from file. I don't know though.
http://speechproject.mixnmojo.com/
The game is played with this speech pack (although it is only work in progress at the moment) through ScummVM. This means that a similar project would probably be possible for Maniac Mansion. However it would probably take a lot of effort and technical expertise to implement.
The Monkey Island project requires an altered version of MONKEY1.000 to be released. This is possible legally I believe as the game will still not run without MONKEY1.001 (as it contains almost all the game). If, on the other hand, all the .LFL files of Maniac Mansion would need to be altered and redistributed, it would be a legal issue because it would require the distribution of the enitre game.
That's not to say that it isn't legally possible as a ScummVM feature if ScummVM's interpreter detected the prompts that make speech appear on screen. It could possibly use them to access audio from file. I don't know though.
I am pretty sure it would be possible to achieve this even w/o altering any original data files (and BTW, even distributing a modified MONKEY.000 would be risky from a legal point of view -- I am not claiming it is illegal, as I am not a lawyer, but I am highly skeptical about its legality .
cisco17, the text for those old games is directly encoded into the game script. There is no "phrase id". The actor, though, usually is specified. A possible approach to implement speech packs (and, for that matter, localization packs) without modifying the original data files, but with modifying ScummVM, would be to do something like this: When an actor is supposed to "say" something, take the text, and compute a hash sum (say, CRC or MD5) from this. Then, use that, together the with the actor id (and possibly also the room / script id -- not sure if that would be a good idea). Then, lookup a speech file and/or a replacement text using that data, and play it instead.
This leaves some issues, though, like text-speech syncing -- there is no lip sync, of course, but the system still would need to know how to wait long enough until the current text has finished playing before proceeding, etc.
cisco17, the text for those old games is directly encoded into the game script. There is no "phrase id". The actor, though, usually is specified. A possible approach to implement speech packs (and, for that matter, localization packs) without modifying the original data files, but with modifying ScummVM, would be to do something like this: When an actor is supposed to "say" something, take the text, and compute a hash sum (say, CRC or MD5) from this. Then, use that, together the with the actor id (and possibly also the room / script id -- not sure if that would be a good idea). Then, lookup a speech file and/or a replacement text using that data, and play it instead.
This leaves some issues, though, like text-speech syncing -- there is no lip sync, of course, but the system still would need to know how to wait long enough until the current text has finished playing before proceeding, etc.
Well, your idea seems very interesting.
The problem of how much time the pharse must long, could be solved if the variable of time (the counter) that tells the amount of time the text must be shown (directly proportional to text length, I think) is replaced by the duration of the wav file assigned to the phrase.
The question is, it may be "easy" to implement it to ScummVM so it does the thing in real time?
The problem of how much time the pharse must long, could be solved if the variable of time (the counter) that tells the amount of time the text must be shown (directly proportional to text length, I think) is replaced by the duration of the wav file assigned to the phrase.
The question is, it may be "easy" to implement it to ScummVM so it does the thing in real time?
Ah, sorry, I didn't mean to get your hopes too much up with that -- no, I don't really want to work on that right now, the little time I have for ScummVM I'd prefer to spend on other things. I just wanted to say that I believe it is doable, but that this is a very relative thing -- it might be very hard for somebody who is not so experienced with ScummVM, or even with programming.
Anybody who wants to work on that should have a bit of experience with C++. And be willing to learn quite a bit.
While I don't want to work on this myself, I'd be willing to help point people at places they may have to look at to get this to work. I am sure other team members are also willing to help by answering well-asked questions .
Anybody who wants to work on that should have a bit of experience with C++. And be willing to learn quite a bit.
While I don't want to work on this myself, I'd be willing to help point people at places they may have to look at to get this to work. I am sure other team members are also willing to help by answering well-asked questions .
Well, I haven't been able to compile it after trying every day for almost TWO YEARS...
Just joking! But I wanted to refloat this topic as I have seen that now the oficial version of ScummVM support patched Monkey Island Talkie Editions... maybe nowadays is a planning or option of adding speech to non-speech old-school games like Maniac Mansion?
Still interested in doing it, if possible, specially if someone wants to help implement it!
Just joking! But I wanted to refloat this topic as I have seen that now the oficial version of ScummVM support patched Monkey Island Talkie Editions... maybe nowadays is a planning or option of adding speech to non-speech old-school games like Maniac Mansion?
Still interested in doing it, if possible, specially if someone wants to help implement it!
Ok.
I see I'm alone in that, but I will keep trying!
Here is my progress:
- I finally was able to compile scummvm with MinGW.
- I found a place in the code which could be used to add speach.
It's on string.cpp inside scumm folder inside engines.
Here, I found that:
if (_talkDelay)
return;
So, basically, here, the engine is waiting for the _talkDelay value (time that the showing text must wait before going out) to reach 0.
I added those lines there:
if (_talkDelay)
{ debug(0,"\n\rACTOR: %u",_actorToPrintStrFor);
debug(0,"HAVE MSG: %u",_haveMsg);
debug(0,"TEXT: %s",_charsetBuffer);
debug(0,"TEXT FINSON: %u",_charsetBufPos);
debug(0,"TIME: %u",_talkDelay);
return;
}
With that, I have the value of the actor who is speaking the text (actorToPrintStrFor), the spoken text (_charsetBuffer), the time remaning for the text to be shown (_talkDelay) and two other values (haveMsg and _charsettBufPos) necessary for Maniac Mansion strings, where the entire text is shown in parts on the screen.
So, with that, if I am capable to modify the way maniac mansion it's loaded so it looks for a monster.sou file and loads samples for it (maybe adding "another game", "maniac mansion talkie", but don't know how to do it yet), maybe it's possible to add a hack that if the game id is that one from the "maniac talkie" version, when a text is shown, a specific sample (calculated with a hash sum of the text and the actor number) is played and then the remaining time is set to 0.
Mmmmhh..... any help?
I see I'm alone in that, but I will keep trying!
Here is my progress:
- I finally was able to compile scummvm with MinGW.
- I found a place in the code which could be used to add speach.
It's on string.cpp inside scumm folder inside engines.
Here, I found that:
if (_talkDelay)
return;
So, basically, here, the engine is waiting for the _talkDelay value (time that the showing text must wait before going out) to reach 0.
I added those lines there:
if (_talkDelay)
{ debug(0,"\n\rACTOR: %u",_actorToPrintStrFor);
debug(0,"HAVE MSG: %u",_haveMsg);
debug(0,"TEXT: %s",_charsetBuffer);
debug(0,"TEXT FINSON: %u",_charsetBufPos);
debug(0,"TIME: %u",_talkDelay);
return;
}
With that, I have the value of the actor who is speaking the text (actorToPrintStrFor), the spoken text (_charsetBuffer), the time remaning for the text to be shown (_talkDelay) and two other values (haveMsg and _charsettBufPos) necessary for Maniac Mansion strings, where the entire text is shown in parts on the screen.
So, with that, if I am capable to modify the way maniac mansion it's loaded so it looks for a monster.sou file and loads samples for it (maybe adding "another game", "maniac mansion talkie", but don't know how to do it yet), maybe it's possible to add a hack that if the game id is that one from the "maniac talkie" version, when a text is shown, a specific sample (calculated with a hash sum of the text and the actor number) is played and then the remaining time is set to 0.
Mmmmhh..... any help?
Two years ago, I upped this thread started two years ago from two years ago...
And I will two years by today!
If somebody re-reads that... in the last post, the project got stuck in a place where the ScummVM, in debug mode, is able to show the name of an hipothetic wav file needed to play when an actor says some text.
If I just have the possibility to make the program LOAD this wav, play and close it, it would be possible to add speech to the game with this patched ScummVM. I'm sure is not really difficult for someone with more knowledge than me.
So, is anyone willing to help this nostalgic-nerdy project come true?
Pretty pretty please with lots of sugar on top?
And I will two years by today!
If somebody re-reads that... in the last post, the project got stuck in a place where the ScummVM, in debug mode, is able to show the name of an hipothetic wav file needed to play when an actor says some text.
If I just have the possibility to make the program LOAD this wav, play and close it, it would be possible to add speech to the game with this patched ScummVM. I'm sure is not really difficult for someone with more knowledge than me.
So, is anyone willing to help this nostalgic-nerdy project come true?
Pretty pretty please with lots of sugar on top?
-
- Posts: 5
- Joined: Tue Jan 07, 2014 7:18 pm
- Strangerke
- ScummVM Developer
- Posts: 335
- Joined: Wed Sep 06, 2006 8:39 am
- Location: Belgium
Here... again!
At this point, I have a debug version with very few lines of code added that, when someone is talking on Maniac Mansion, creates a wav name for it depending on the actor speaking and the text itself.
I'm looking for someone to help adding the piece of code needed so the calculated wave file for each phrase is played, so then, we can easily (at least the programming part) make a talkie maniac mansion version.
Is there anyone willing to help?
At this point, I have a debug version with very few lines of code added that, when someone is talking on Maniac Mansion, creates a wav name for it depending on the actor speaking and the text itself.
I'm looking for someone to help adding the piece of code needed so the calculated wave file for each phrase is played, so then, we can easily (at least the programming part) make a talkie maniac mansion version.
Is there anyone willing to help?