Page 1 of 2

Expand Your Voice Pack Library.

Posted: Tue Nov 15, 2016 10:38 pm
by Skellethorn
Here's a little tutorial on how to expand your voice pack library with no downloads or audio editing at all, it's all simple code which in minutes will allow you to modify all your current voice packs. I found this poking around the MultiMesh.u package, it's the same method they used to turn the Male B voice into the Skaarj Hybrid voice.
In case you don't know how to create and compile a package, check this post by FeraliDragon: viewtopic.php?f=57&t=4482, I use UMake and Notepad++ as well, but I'm sure there are other methods.
Once that is done, create the new package which will keep all your voice packs, then use this template code to modify them:

Code: Select all

Class MODIFIEDVOICE Extends BASEVOICE; 

Function Timer () 
{ 
	Local Name MessageType; 
	
	IF (bDelayedResponse) 
	{ 
		bDelayedResponse = False; 
		IF (Owner.IsA ('PlayerPawn')) 
		{ 
			IF (PlayerPawn (Owner).GameReplicationInfo.bTeamGame && (PlayerPawn (Owner).PlayerReplicationInfo.Team == DelayedSender.Team)) MessageType = 'TeamSay'; 
			Else MessageType = 'Say'; 
			PlayerPawn (Owner).TeamMessage (DelayedSender, DelayedResponse, MessageType, False); 
		} 
	} 
	IF (Phrase [PhraseNum] != None) 
	{ 
		IF (Owner.IsA ('PlayerPawn') && !PlayerPawn (Owner).bNoVoices && (Level.TimeSeconds - PlayerPawn (Owner).LastPlaySound > 02)) 
		{ 
			IF ((PlayerPawn (Owner).ViewTarget != None) && !PlayerPawn (Owner).ViewTarget.IsA ('Carcass')) 
			{ 
				PlayerPawn (Owner).ViewTarget.PlaySound (Phrase [PhraseNum], SLOT_Interface, 16.00,,, 00.XX); 
				PlayerPawn (Owner).ViewTarget.PlaySound (Phrase [PhraseNum], SLOT_Misc, 16.00,,, 00.XX); 
			} 
			Else 
			{ 
				PlayerPawn (Owner).PlaySound (Phrase [PhraseNum], SLOT_Interface, 16.00,,, 00.XX); 
				PlayerPawn (Owner).PlaySound (Phrase [PhraseNum], SLOT_Misc, 16.00,,, 00.XX); 
			} 
		} 
		IF (PhraseTime [PhraseNum] == 00) Destroy (); 
		Else 
		{ 
			SetTimer (PhraseTime [PhraseNum], False); 
			PhraseNum++; 
		} 
	} 
	Else Destroy (); 
} 

DefaultProperties 
{ 
}
MODIFIEDVOICE will be whatever name you want this new voice to have, BASEVOICE is the base voice you will be using, like the Male A voice, the Boss voice or any custom voices you may have, finally, you will change the 00.XX values to whatever number you want, like 00.62, 00.86 or something similar, this value which change the pitch of the voice which will in turn make it sound different, just experiment with the voices and the values until you find something you like. I personally use the Boss voice with a pitch of 00.88 and I think it sounds fine.
Once you have all your new files, compile them, then make your .int file in your system folder like this:

Code: Select all

[Public]
Object=(Name=PACKAGENAME.MODIFIEDVOICE,Class=Class,MetaClass=BotPack.VoiceBoss,Description="MODIFIED VOICE")
Object=(Name=PACKAGENAME.MODIFIEDVOICE,Class=Class,MetaClass=BotPack.VoiceMale,Description="MODIFIED VOICE")
Object=(Name=PACKAGENAME.MODIFIEDVOICE,Class=Class,MetaClass=BotPack.VoiceFemale,Description="MODIFIED VOICE")
Of course in PACKAGENAME you'll write the package name you choose for your folder with all the new .uc files, and MODIFIEDVOICE will have the name of all the files you made, the second MODIFIED VOICE can have whatever you want, this is what you will read in the character window, since it is typed between quotation marks you can have spaces. You will use the MetaClass VoiceBoss for the Boss models, the VoiceMale for male models and VoiceFemale for female models, pretty simple, I usually make the double entries to have the same voices on the boss models and the male models.
Now start Unreal Tournament, check the voices, test them out in game and keep experimenting. This method is great because it allows you to expand your voice pack library without having to learn how to modify audio files or having to make a voice pack yourself, it also doesn't alter the stock files which means you'll still have all your previous voices untouched, we simply made extentions of them. Also, this only changes the pitch of the voices, I'm sure there are more things you could tweak and change but I have not experimented with that yet.

Re: Expand Your Voice Pack Library.

Posted: Tue Nov 15, 2016 11:55 pm
by papercoffee
:| if someone would be so nice to explain why and what all those lines are doing, I could better understand coding.

Why are here two values?

Code: Select all

            PlayerPawn (Owner).ViewTarget.PlaySound (Phrase [PhraseNum], SLOT_Interface, 16.00,,, 00.XX);
            PlayerPawn (Owner).ViewTarget.PlaySound (Phrase [PhraseNum], SLOT_Misc, 16.00,,, 00.XX); 
What is SLOT_Interface doing and why is there a second line with SLOT_Misc?

Re: Expand Your Voice Pack Library.

Posted: Wed Nov 16, 2016 12:26 am
by Barbie
papercoffee wrote:What is SLOT_Interface doing and why is there a second line with SLOT_Misc?
Documentation is rare on this... <What I guess> Sounds can be played on client in different channels - see Actor.uc:

Code: Select all

// Sound slots for actors.
enum ESoundSlot {
	SLOT_None,
	SLOT_Misc,
	SLOT_Pain,
	SLOT_Interact,
	SLOT_Ambient,
	SLOT_Talk,
	SLOT_Interface,
};
Playing a new sound on a busy channel will interrupt the current playing sound but not current playing sounds on other channels. So you can use multiple sounds at the same time.</What I guess>

Re: Expand Your Voice Pack Library.

Posted: Wed Nov 16, 2016 12:53 am
by papercoffee
Ok ...now this makes sense, somehow. To avoid to not hear the voice are you using two channels.

Re: Expand Your Voice Pack Library.

Posted: Wed Nov 16, 2016 1:05 am
by UTNerd24
Ugh... I said it once, I'll say it again. Coding to me is an enigma. I guess now I wait for someone to make a Male One Skaarj. Still though, To those who are coders, Its a great discovery!

Re: Expand Your Voice Pack Library.

Posted: Wed Nov 16, 2016 4:47 am
by SC]-[WARTZ_{HoF}
UTNerd24 wrote:Ugh... I said it once, I'll say it again. Coding to me is an enigma. I guess now I wait for someone to make a Male One Skaarj. Still though, To those who are coders, Its a great discovery!

I'm assuming that if a male one voice for skaarj player is made it might end up being a custom skaarj package all together since we know that the skaarj as it is uses male two voice by default. Of course I have had a few drinks so I maybe wrong so I apologize in advance if I'm not absolutely positive on the subject.


P.S. Not to go to off subject but I do plan to make a BadSanta2 Voicepack soon as I get my hands on the new movie. Should be very crude taunts as usual. :rock:

Re: Expand Your Voice Pack Library.

Posted: Wed Nov 16, 2016 7:07 pm
by papercoffee
SC]-[WARTZ_{HoF} wrote: P.S. Not to go to off subject but I do plan to make a BadSanta2 Voicepack soon as I get my hands on the new movie. Should be very crude taunts as usual. :rock:
If you can get it without the movie sounds in the background ...I would be your first costumer. :mrgreen:

Re: Expand Your Voice Pack Library.

Posted: Thu Nov 17, 2016 1:37 am
by EvilGrins
I have what may be a silly question: If this method of yours works, to alter the audio output of existing voicepacks without creating new files, how would that impact server games?

I can't imagine there's any way to list that altered audio under ServerPackages without new filenames.

Re: Expand Your Voice Pack Library.

Posted: Fri Nov 18, 2016 12:10 am
by Skellethorn
Yes, I think what Barbie said about the "SLOT_"s and the channels is true, so it's best to keep all four of those lines where they are. About the two values, the 16.00 is the volume and the 00.XX is the pitch, like I said, you may play with them but what I usually do is just change the pitch, that's all you really need to know.
EvilGrins wrote: I have what may be a silly question: If this method of yours works, to alter the audio output of existing voicepacks without creating new files, how would that impact server games?
I can't imagine there's any way to list that altered audio under ServerPackages without new filenames.
It does, and all you need to do now is add the package name to your ServerPackages. Once you compile your code, a new .u file should be created on your system folder, just add the name of that file to your ServerPackages as you would with any other voice pack you would download. At least I think that's how it's done, I'm not a hundred percent sure as I don't really play online.
UTNerd24 wrote: Ugh... I said it once, I'll say it again. Coding to me is an enigma. I guess now I wait for someone to make a Male One Skaarj.
You should have no problem doing this yourself, just follow FeraliDragon's tutorial on packages and compiling and mine here and it should be simple, you don't really need to know anything about coding, just follow the instructions.

Re: Expand Your Voice Pack Library.

Posted: Sun Dec 11, 2016 1:06 pm
by UnrealGGecko
I'll give this a shot once I have some free time, as I'm also interested in a MaleOne turned to skaarj hybrid voicepack.

For now bookmarked this thread. Can't promise, but I'll let you guys know about the results when I can :tu:

EDIT at 2016-12-11: Tried it out, let me know if you have any issues :P

Pitch used is 0.88 and I added in the Skaarj grunts that are in the Skaarj Hybrid VP as well... they got pitched too :ironic: :lol2:

Re: Expand Your Voice Pack Library.

Posted: Sun Dec 11, 2016 11:38 pm
by UTNerd24
UnrealGecko wrote:I'll give this a shot once I have some free time, as I'm also interested in a MaleOne turned to skaarj hybrid voicepack.

For now bookmarked this thread. Can't promise, but I'll let you guys know about the results when I can :tu:

EDIT at 2016-12-11: Tried it out, let me know if you have any issues :P

Pitch used is 0.88 and I added in the Skaarj grunts that are in the Skaarj Hybrid VP as well... they got pitched too :ironic: :lol2:
I honestly wouldve gone with 0.70 or 0.60 but FINALLY ITS HERE!! And I love it.
And adding the "Curses" is just the icing. Thanks, Gecko. :tu:

Re: Expand Your Voice Pack Library.

Posted: Wed Dec 14, 2016 12:02 am
by UnrealGGecko
UTNerd24 wrote:I honestly wouldve gone with 0.70 or 0.60 but FINALLY ITS HERE!! And I love it.
And adding the "Curses" is just the icing. Thanks, Gecko. :tu:
I tried using 0.80 pitch and even that was way too low for my liking (started being more slow-mo than something a skaarj could say). Ah well, nothing too complex to change. Pretty happy how it turned out, actually. :) Thanks for trying it out :thuup:

Re: Expand Your Voice Pack Library.

Posted: Wed Dec 14, 2016 5:30 am
by UTNerd24
No problem. Im just glad one of my crazy ideas actually appealed to someone for once.

Re: Expand Your Voice Pack Library.

Posted: Mon Feb 19, 2018 12:23 pm
by papercoffee
Bumb for request...

I would love to have a pitched male voice to sound like a female. Is this possible? And if yes, can this kind someone share it :mrgreen:

Re: Expand Your Voice Pack Library.

Posted: Mon Feb 19, 2018 2:53 pm
by Barbie
papercoffee wrote:I would love to have a pitched male voice to sound like a female. Is this possible?
You can pitch it, yes, but it sounds more like a helium voice:
MaleVoicePitched.wav.7z
(17.72 KiB) Downloaded 73 times
Try it yourself with Audacity.