Community

SCI Programming => SCI Development Tools => Topic started by: hobb909 on January 25, 2024, 12:46:24 PM

Title: Voice acting in Space Quest V - Part 2
Post by: hobb909 on January 25, 2024, 12:46:24 PM
Delete my post. Thank you.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on January 25, 2024, 01:02:38 PM
I'm gonna be honest here.

I regret approving your account.

I would've gladly helped with issue 1 considering I know exactly what's going on with these actually not so random letters, I even would've volunteered to do actual voice work for you, free of charge, if you'd asked.

But I can't abide the use of "AI", so let's hope for your sake someone else is willing to explain the issue instead.

(Edit: oh hey, turns out you linked to my very post about the subject. Well, if that didn't help you any, my point stands.)
Title: Re: Voice acting in Space Quest V - Part 2
Post by: doomlazer on January 25, 2024, 03:18:53 PM
I regret approving your account.

WTH? This is a pretty abusive way to express you opinion about ML. Reads like a personal attack on someone asking for help. Not a great look, dude.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: deckarep on January 25, 2024, 07:30:17 PM
I'm genuinely curious what exactly the problem with an AI generated voice is?

There's a huge backlash with AI that I don't understand. Sure it can be a bad performing model and not sound great. But some of them do and its only going to get better. Meanwhile there are people who can benefit from Text-To-Speech solutions that are more natural surrounding whether it's artificially generated or not.

Also, some voice actors are sanctioning their voices to be licensed in this manner so it's not all bad. It may not be some peoples preference but it doesn't automatically make AI voice generated bad across the board.

Yolo!
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on January 26, 2024, 04:28:22 AM
Huh. Dude deleted his post just when I resolved, if nobody else stepped up to explain the problem with "both" mode, I'd do it myself.

Guess Hobb won't see then if I were to explain that the reason you see only a single letter on screen in "both" mode is because Narrator::say and therefore also Talker::say only takes one buffer pointer, which will contain the text to display or a bunch of numbers to play the audio for, and that between SCI numbers being 16-bit and the first one being the module/script number, that means doing something like "look at room" will put something like 110 there, which is n in ASCII. If your script number were high enough you'd get two characters.

Code: [Select]
(if (& gMessageType $0001) (self startText: buffer))
(if (& gMessageType $0002) (self startAudio: buffer))

See? So in "both" mode, buffer will contain audio key numbers instead of text, which is then passed to startText.

First part of my fix was to take this line in Talker.sc, (method (say buffer theCaller), and replace it with (method (say theText theAudio whoCares). That way those two lines can have their own data simultaneously.

Then of course you gotta edit Messager::saynext. I would explain why that part messes up but I'm not sure if Hobb is still around to read it.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: doomlazer on January 26, 2024, 04:43:36 AM
So you're on board with my Gary Owens Synth?
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on January 26, 2024, 04:54:02 AM
When I went to sleep last night, this thread was roughly 60% SQ and 40% AI.

When I woke up today it was almost entirely AI by volume, what with Hobb deleting his post and Deck's yolo.

So no, Doomlazer. Even disregarding my feelings on AI, I'm gonna say I'm not on board just so someone puts this trainwreck back on track.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: doomlazer on January 26, 2024, 05:59:43 AM
A computer could never capture a Gary Owens performance.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Charles on January 26, 2024, 01:20:00 PM
What's the state of AI when it comes to converting somebody's voice to somebody else's?  I'd love to see a real person perform lines, and then just change the voice to somebody else's, like Gary Owens.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on January 26, 2024, 05:06:13 PM
https://mashable.com/article/drake-weeknd-ai-song-controversy
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Charles on February 26, 2024, 07:22:45 PM
Hey, was this the project the original poster was talking about? I think that progress and potential is mind blowing!
https://www.facebook.com/groups/SierraGamingWorld/permalink/1354926355216962/?mibextid=W9rl1R (https://www.facebook.com/groups/SierraGamingWorld/permalink/1354926355216962/?mibextid=W9rl1R)
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on March 01, 2024, 04:59:17 PM
Or this? https://www.facebook.com/groups/506372223034008/?multi_permalinks=2103743253296889
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cosmicr on March 18, 2024, 10:33:26 PM
I had a play with a Gary Owens synth trained on SQ4 using ElevenLabs, with the exact thoughts of trying to implement it in SQ5.

Then I saw the earlier thread and have seen how difficult it might be and figured it's not worth it for the small niche of fans that might appreciate it.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: doomlazer on March 23, 2024, 01:09:16 PM
Here's about 80% of Gary Owens wavs from SQ4 and their transcriptions in LJSpeech format: https://pixeldrain.com/u/pjJnC7HD. I removed files with clicks, that were excessively long or of especially poor audio quality.

I tried training a voice model from someone's google colab notebook awhile back, but I kept running out of storage and couldn't get tensorboard to run. That was after solving a bunch of other issues with the notebook and I eventually just gave up. I don't have a GPU to do anything besides use colab. Maybe someone else can do something with the files, but I have a feeling ML can't really capture the unique charm of Owen's performance anyway.

Edit: update files to include non-LJSpeech transcription.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: MusicallyInspired on April 06, 2024, 12:09:35 PM
I'm going to be the odd one out and say that I believe Gary Owens isn't the best choice for narrating SQ5. He does best when narrating Scott's writing (or Josh's). But SQ5 isn't about immense sarcasm. It needs a different flair. I don't know what, but Gary Owens isn't it.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on April 06, 2024, 12:12:49 PM
I agree, but also it's "flair'.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: MusicallyInspired on April 06, 2024, 12:13:35 PM
That's what I said... 8)
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Charles on November 05, 2024, 08:52:30 AM
Looks like he's completed his SQV Voice Acting mod.  I'm eager to try it out... not sure I ever finished SQ5 now that I think of it... seems like an excellent opportunity to try.

https://github.com/cdb-boop/Space-Quest-V-Voice-Acting-Mod (https://github.com/cdb-boop/Space-Quest-V-Voice-Acting-Mod)
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 05, 2024, 07:53:51 PM
I see by his readme.md that he tried to register here, but do not see any account requests, nor do I see any users by the same user name as his repo account.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 05, 2024, 08:16:39 PM
Hi everybody. Looks like I got in. :P

I wanted to announce it here first but... grab your mop! Voice acting in Space Quest 5!

There was a lot of banging my head against a wall for days at a time trying to debug the code, and so I just wanted to say thanks to the people here for the bits and pieces of information on how to get the code working. I swear half the bugs I encountered were caused by some issue with decompilation. Admittedly, I changed a few minor things (e.g. restoring the cursor after a message, capping the EVA busy wait to 60fps) so I hope you guys don't mind.

Anyways, I know the voice acting is not perfect, but I have a bad habit of starting big projects and never getting them done, so I drew a line in the sand and released it.

If you have any questions or constructive criticism, I'm open talking or listening. Also, there's a nagging issue with loading saved games in ScummVM that I'd appreciate some help resolving.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: lskovlun on November 05, 2024, 10:08:55 PM
If you have any questions or constructive criticism, I'm open talking or listening. Also, there's a nagging issue with loading saved games in ScummVM that I'd appreciate some help resolving.
Sure! I haven't contributed any code of consequence to ScummVM since Christmas 2018, but if we find out that there's a bug in ScummVM I'm sure I can get hold of them.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 05, 2024, 10:26:47 PM
Thanks lskovlun! Not 100% sure if it is a ScummVM issue, but it didn't happen in DOSBox or DOSBox-X. Maybe a decompilation-recompilation bug?

In order to reproduce it, you just need to save the game and then load the save. Once you do that, you'll notice that all the text boxes are missing.

I would have supported voice-only, except the text boxes are required for the branching dialogue options.

Last time I tried, I also had some trouble overriding the voice/text settings in ScummVM, so maybe the issue is somehow related to that? Overriding it to have text-only worked, but the voiced options didn't behave as expected.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: lskovlun on November 05, 2024, 11:42:46 PM
I can't run the patched code at all. Neither with SSCI nor with ScummVM. I'm running a Linux system (so NSIS patching via Wine, not sure if that works), and maybe the patch isn't for the exact version of SQ5 that I have? In any case, I can't investigate for now.

EDIT: Actually, SSCI does run, there's just no sound. And ScummVM bugs out with these messages:
Code: [Select]
User picked target 'sq5-1' (engine ID 'sci', game ID 'chest')...
WARNING: Could not get volume for resource 0, VolumeID 0!
WARNING: Error 6 occurred while reading text.51969 from resource file resource.000: Unknown compression method!
WARNING: resMan: Failed to read text.51969!
WARNING: Couldn't identify game 'chest' for the engine 'sci'.!
(I cloned the game entry for my original SQ5 copy. I have no idea why it refers to 'chest', which was one of the bonus things they included with later games)
Title: Re: Voice acting in Space Quest V - Part 2
Post by: lskovlun on November 05, 2024, 11:55:35 PM
The version file from my version says 1.04, what's yours?
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 05, 2024, 11:58:17 PM
Same 1.04.

Did you download the audio files?
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 06, 2024, 06:14:41 PM
I see that you used VPatch to generate your patch files. I am working from the GOG release since this is the version that most will probably be using, though most editions of the various releases use 1.04. I had to fiddle around with generating a RESOURCE.CFG since the patch does not copy any of the Sierra installer files or driver files. Simply copying INSTALL.EXE,  INSTALL.HLP, INSTALL.SCR and INSTALL.TXT does not work  because the installer fails with the inclusion of the GUS driver. since the INSTALL.HLP is missing the gmgus.drv entry. I am not sure that the inclusion of the GUS driver really adds anything over the GM driver.

I am curious about the SCI patches. The installation media does not include a "PATCHES" subdirectory, so all of the original included are just in the base of the SQ5 of the installation media. Did you repack all of these files, even the ones that were not changed by your patch. Also, did you include the NRS patch? There is also the official SQ5PAT patch for 1.03. Was this included? Perhaps a list of the SCI patches you created for this project?

I would consider writing one of my DOSBox installers for this but I need some these SCI patch questions answered.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 06, 2024, 07:05:41 PM
I'm working from the SQ5 from the collection from Steam.

What you're asking is going a bit over my head. I saw your suggestion on here and tried to make an exe for patching. If you look at the project page on GitHub, I included the bat file to generate the patch files and the nsi file to make the exe.

Here's my directory setup if that helps. It's the three patch directories, two script files, the generated exe and the original game files in the root.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 06, 2024, 08:30:38 PM
Were any of the patch files in the game's base directory modified? I guess I mostly want to know what SCI patch files you created/edited.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 06, 2024, 08:44:10 PM
I decompiled the whole thing and I might have needed to remove the patch files. My memory is a bit fuzzy because I got the driver working back in December 2023. In my current development directory there are no more patch files.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Charles on November 06, 2024, 08:46:34 PM
I had to fiddle around with generating a RESOURCE.CFG since the patch does not copy any of the Sierra installer files or driver files. Simply copying INSTALL.EXE,  INSTALL.HLP, INSTALL.SCR and INSTALL.TXT does not work  because the installer fails with the inclusion of the GUS driver. since the INSTALL.HLP is missing the gmgus.drv entry.

The installer can read external driver.hlp files. I've attached one that can be just dropped into your SQ5 folder that will make the installer work properly.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: lskovlun on November 06, 2024, 10:40:51 PM
OK, so I managed to get it to work. I had a stray file in the SQ5 directory that ScummVM somehow picked up even though it shouldn't. Once I got past that, I was able to look at the bug - and yes, it is a bug in ScummVM. It happens in a part of ScummVM that tries to synchronize the in-game settings with those of the main ScummVM UI. For various reasons (mostly related to SCI32 games), this code has a hard-coded list of games that support text and subtitles at the same time. Unsurprisingly, SQ5 is not among them!

I'll contact the right people next, so we can get this sorted (I do have commit access, but I haven't used it in years).
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 06, 2024, 11:05:09 PM
Good to hear. Fixing it won't mess with playing the original version, right?
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 07, 2024, 09:35:44 AM
The installer can read external driver.hlp files. I've attached one that can be just dropped into your SQ5 folder that will make the installer work properly.

Oh, I know how the installer works and had already edited the INSTALL.HLP. That is part of what I had called 'fiddling around'. But even so, without the RESOURCE.CFG stub file that is included with the original install media the generated cfg file the generated cfg will not include the extra flags from the stub. Without the minHunk set, the game will fail to launch. While it is easy enough to manually write a working RESOURCE.CFG, I usually try to approach these things from the point of view of helping more average users, which is to simply run the install.exe.

As I said, I was thinking about making an NSIS script to automate the entire process to have a ready to play game from the user's copy of the game, much like my SHP installers.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 07, 2024, 10:04:20 AM
@cdb-boop, I take it that when you decompiled the game your copy had all of the patch files in the game's folder. In that case the decompiled scripts would have been from the included patch files. I'll assume that the steam version comes from one of the official collections (which included the SQ5PAT patch) and did not include the NRS patch.

Do you have a list of the scripts altered by you? Specifically did you alter scripts 104, 110 or 994?



Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 07, 2024, 10:48:47 AM
Sure. Most of the changed files were me being a trigger happy perfectionist and changing some timings from cycles to ticks where I assumed the animations were too fast at higher cycles. I think most of the game can actually now be played at max cycles, save a few animations here and there.

104 had to be changed to add vocals to the intro as it did not make use of the Messager.

110 I altered to "fix" timings and I added back the red lighting at the start (commented out `(Palette palSET_FROM_RESOURCE 600 2)`).

994 was altered to add `case 0` to Rgn and Rm classes as suggested on here to get things to work with the audio driver.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: lskovlun on November 07, 2024, 08:41:24 PM
It seems safe to me. But let's see what sluicebox and bluegr say.

EDIT: I'll just attach the patch that I use, in case anyone wants to try.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 13, 2024, 06:45:56 AM
Besides the narration, people generally disliked the poor voice acting quality and are getting more aggressive.

I took it down to avoid negativity over something mediocre that was meant to be fun.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: OmerMor on November 13, 2024, 12:21:05 PM
Besides the narration, people generally disliked the poor voice acting quality and are getting more aggressive.

Really? I quite enjoyed the voice acting ...
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 13, 2024, 12:56:35 PM
Kind of.

If I were to try this again, I'd make sure to train with a variety of voices and make sure the resulting voices were truly unique. I expect it would be a challenge to keep them consistent, high quality and charming, but I guess that comes with the territory. Furthermore, I'd work on something like Conquests of the Longbow or Heart of China, as there are no vocal expectations and I can be more creative.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 13, 2024, 05:29:09 PM
And... really I was spooked by the possibility of the passing of the No Fakes act (https://www.congress.gov/bill/118th-congress/senate-bill/4875), which, as I best understand it, would make computer-generated likeness protected property in the US. I want to continue abiding by all relevant laws and certainty want to avoid getting into trouble over something that, again, people have said sounds "alien" and "bad", and so I have preemptively taken it down and will not do something this risky in the future.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: doomlazer on November 14, 2024, 10:37:37 PM
Shame you took it down. I actually have a friend who was planning to integrate the project with their Spanish translation of SQV.

As for the no fakes act, I wouldn't worry about any Dem. sponsored bills getting passed for awhile. Besides, if any of the rights holders cared, you'd have a chance to take it down. It's not like you're monetizing it. And if the installer is a diff patch, you're not distributing any copyrighted material.

As for the voices, the narrator sounds surprisingly good from the sample I heard. If the other voices are trash, maybe try to get actual people to record those lines. There seemed to be interest in the project so you'd probably get some volunteers fairly easily.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 15, 2024, 12:41:09 AM
Yeah, I guess I just got a bit paranoid after a bunch of attention shot up like a rocket after the Hacker News posting.

I guess I just needed a few days and some kind of external assurance that I wasn't going crazy. I mean, I know that cg videos of Will Smith eating spaghetti are still posted and voice and image models of celebrities are fine-tuned and uploaded online. Regarding me, the relevant legislation in my state and in the US is still early and in the works, so I'm safe.

I'll trust you and I've put things back up for now...

But like I said earlier, I would like to try and figure out how to make unique voices so I don't need to worry about this stuff anymore.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Collector on November 15, 2024, 06:24:18 AM
The Sierra community is alive and well, though mostly on Facebook these days. I suggest that you advertise for voice actors in the various Sierra groups and have them submit audition samples.This could be done remotely. If unsure you could ask some of the fan and or indie developers that have released their games with voice packs for suggestions. Don't give up, your project should be far from done.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 15, 2024, 06:53:20 AM
Thanks for the suggestion and kind words, Collector.

Maybe that'd be easier, as training voices, especially for smaller roles with the current tech it is really inconvenient and labor intensive without taking bad shortcuts.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on November 15, 2024, 07:09:17 AM
Y'know that's not what Collector said, right?
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 15, 2024, 07:25:38 AM
They said organize fans to do the voice acting instead of TTS, no? Sorry, I made a comma a period and maybe it sounded wrong.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on November 15, 2024, 07:28:20 AM
It's all clear now.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cosmicr on November 19, 2024, 10:03:25 PM
Hey I commented on your reddit post too - I loved the idea of this.

Its a shame you took it down. I have found AI generation to be very divisive actually, and have learned to be careful whom I mention it to these days.

FWIW I would have left it up and waited until told to remove it. 

There are some very good text-to-speech and even speech-to-speech toolsets out there -  I use them for work video presentations.  You could use a voice creator and then use speech-to-speech with fans acting.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on November 20, 2024, 03:49:43 AM
I think you're all kinda underselling the imitative abilities of the fans, here. Or perhaps the ability of people in general to sound like other people.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on November 21, 2024, 12:27:25 AM
@cosmicr Hi again. I did put it back up.

I assume at the present time most people are disinterested in working on a project with this kind of AI, so I currently think any fan voice-mod would have to be all AI voices or all real voices. In the case of Space Quest I felt the narrator had to sound like Gary Owens, but I don't want to deal with that kind of constraint, so I'm looking at CotL and HoC.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: Kawa on November 21, 2024, 06:37:34 AM
That "like" is doing so much heavy lifting, it should be the bolded word.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: L@Zar0 on January 28, 2025, 06:09:00 AM
I want to give thanks to cdb-boop for the audio acting mod. It is incredible, really (I credited him in the leeme.txt).
I've been working in a translation of the mod into spanish. Here it is some sample:

h.t.t.p.s://youtu.be/WdcZabUC538

I made some fixes for the unresolved bugs. If @cdb-boop wants the sources I will have not any problem on giving them to him.
I solved things like: use it under ScummVM (I played the game from begin to end with max points), no button press in inventory or intro, fixed some voices in specific pictures, etc...

In this case, I decided not to give the option with Speech/Text/Both, sorry. But I think it would be feasible to do.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: cdb-boop on January 28, 2025, 06:33:32 AM
Thanks, @L@Zar0. If you want to share changes, I'd be happy to try add the fixes and update the installation exe.
Title: Re: Voice acting in Space Quest V - Part 2
Post by: L@Zar0 on January 28, 2025, 09:19:48 AM
Sent PM.