Author Topic: Voice acting with variable values?  (Read 1865 times)

0 Members and 1 Guest are viewing this topic.

Offline cdb-boop

Voice acting with variable values?
« on: November 09, 2024, 04:33:20 PM »
Does anyone know how Sierra would have handled voice acting with variable values? Is there a Sierra game that does this?

In particular, I'm looking at SQ1vga and CotL1. I see that strings may contain variables in spoken text. For example, "You have %d Buckazoid%s" or "%s." as a dynamic sentence within a paragraph.

Is there a game with a Messager being able to dynamically branch mid-message or concatenate the audio. The only point of reference I have is that I believe in SQ5 a method is called before calling Messager's `say` method to cause the Messager to print a branching dialogue box instead of the normal speech dialogue.

The options I've considered from easiest to hardest are that I can (1) just use text-only where possible, (2) use a generic response where possible, (3) write some sort of dynamic `say` method in Messager that can handle this or (4) explicitly list out every possible combination or value. (Note that none of these solutions can handle user-provided text that gets spoken back. My solution is ironically too crazy to say out loud.)



Offline Kawa

Re: Voice acting with variable values?
« Reply #1 on: November 09, 2024, 06:15:47 PM »
Can't do it. That's one of the reasons why in Sam & Max Hit the Road, when you repeatedly try to pick up an object you can't pick up, Max will refer to "that stupid object" in the spoken audio, but the on-screen text says "object #<number>".

In SCUMM of course the displayed dialogue can include a talkie tag at the start, which is fixed for Max' line, but SCI's Messager is somewhat less flexible by default, so I'd go with option #2. I don't know of any SCI games that did.

"You have this many Buckazoids."

Offline cdb-boop

Re: Voice acting with variable values?
« Reply #2 on: November 09, 2024, 06:36:53 PM »
Thanks for the answer, Kawa. If it really is a limitation, I guess I'll stick to options one or two.

Offline lskovlun

Re: Voice acting with variable values?
« Reply #3 on: November 10, 2024, 10:36:40 PM »
You could use something like sciAudio and an external TTS tool. The user would need to have this installed. I wrote a (rudimentary) implementation of sciAudio for Linux, so it's not hard. The class library could be changed to support this seamlessly.

Offline cdb-boop

Re: Voice acting with variable values?
« Reply #4 on: November 10, 2024, 11:28:52 PM »
Yeah... that was part of the craziness I was talking about.

There is a real-time voice-to-voice model Beatrice V2 that runs on CPU, so hopefully portable for end users. My crazy idea was to generate the variable audio with a simple text-to-speech tool and pipe it through a fined-tuned Beatrice model.

While this is massive overkill for handling a few lines of dialogue and a likely source of compatibility problems for anyone trying to run a game with this (e.g. ScummVM on mobile), it sounds fun to try, so maybe I'll take some time to look into sciAudio in the SCI Companion template game and see if it is approachable enough for me build this functionality out.
« Last Edit: November 10, 2024, 11:45:43 PM by cdb-boop »

Offline lskovlun

Re: Voice acting with variable values?
« Reply #5 on: November 10, 2024, 11:38:03 PM »
Actually, this was something I worked on in my BSc thesis. We gained access to a grammatical framework called XLE (Xerox Linguistic Environment) but no source code and no technical support. With this sort of stuff, integration is key, so we were in a bit of a bind. It didn't turn out as well as it could have.

You mention numerals, and that is indeed one application. Russian numerals, for example, require case changes according to the number.

Offline cdb-boop

Re: Voice acting with variable values?
« Reply #6 on: November 10, 2024, 11:57:30 PM »
That sounds pretty fun to work with. Though, I think the TTS approach should sidestep the issue of dealing with grammars.

Offline lskovlun

Re: Voice acting with variable values?
« Reply #7 on: November 11, 2024, 12:21:57 AM »
It doesn't - unless the TTS does some of the same work for you (in which case it would need to include a parser as well). But yeah, it was fun to work with, and I got a good grade for it. Generally, I work with innovative ideas. Some of them work, some of them fail. A fact of life.

Offline cdb-boop

Re: Voice acting with variable values?
« Reply #8 on: November 11, 2024, 12:38:17 AM »
Yeah, that's what I meant. I'd look for a solution that would sidestep me dealing with grammars.  :P


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.109 seconds with 22 queries.