Cloned Falcon 4 Voices - Add Voice Frags In the ORIGINAL Voices (Long)
-
@cchaparro
Glad to help. This area is sort of a “speciality” for me. I must pass thanks along to @MeuMestre , whose original work in this area was the key that opened the door for me. I am just paying it forward.I am sure you know this already, but for those that may not, each Add-on theater may have its own …\Sounds folder, which can contain its own unique sound files. This is how we can add new airbase names, for instance, that are unique to the theater. In that case there are additional files that need to be changed besides just Falcon.tlk and F4Talk.csv. That is a lesson for another thread.
ATIS works differently from all of the above, as it uses built-in Microdsoft Voice Recognition software. That is an entirely new lesson for yet another thread.
DM me if you have other questions or suggestions.
Regards,
Tomcattwo
(VoiceClone) -
@Tomcattwo and he can translate thousands of languages.
-
@Tomcattwo said in Cloned Falcon 4 Voices - Add Voice Frags In the ORIGINAL Voices (Long):
Since Falcon BMS know the nine FragIDs and the associated VoiceID (and voice number - Voice 12 in our example), Falcon BMS knows what to print because F4Talk.csv can identify exactly what to print. BMS then generates the response by playing each of the 9 identified VoiceIDs, in order, and prints the line as identified by the FragIDs/Voice positions from F4Talk.csv on the screen!
This thread contains such interesting technical background information! I was wondering based on the above: are the selected frag ids accessible anywhere in shared memory? I would be interested in trying to map them to their texts and generate a synthesized voice externally, as a proof of concept.
Getting the subtitles might work as well, if those are easier to access.
-
@Ricky
The individual VoiceIDs (i.e., each numbered .wav file that has been compressed into the falcon.tlk file) are already “mapped to their texts”. This is because the F4Talk.csv file (which is a text file which maps all the “subtitles” to each FragID), aligns each phrase to its corresponding FragID, and FragFile.xml maps each FragID to the corresponding VoiceIDs it uses.For example, if you open F4Talk.csv using a text editor such as Notepad, Notepad++, Textpad etc., at the very top you will see a “legend” which describes what each line in F4Talk.csv contains. Each line contains 18 values, each separated by a comma.
Fragment,# Voices,Voice 0,Voice 1,Voice 2,Voice 3,Voice 4 (F),Voice 5,Voice 6 (F),Voice 7,Voice 8,Voice 9,Voice 10,Voice 11,Voice 12 (F),Voice 13,Summary,Eval
Voices 4, 6 and 12 are female voices. Voices 0-11 are Pilots/Tanker Boomers, AWACS/JSTARs etc. Voices 12 and 13 are the female and male Air Traffic Controllers.
Which voice does what is mapped in a file called “VoiceRange.dat”, which is in the Campaign folder.
For example, at FragID 2, you will see the line:
2,12,abort mission,mission is aborted,mission abort,abort mission,abort mission,abort mission,mission is aborted,mission abort,abort mission,abort mission,mission abort,mission abort,,,abort mission,
In this FragID (#2) line there are the text of 12 VoiceIDs (12), and the text for each Voice (Voice 00 through Voice 11) are listed. Note that the 12 voices don’t necessarily each say the same phrase. Voices that don’t have a VoiceID.wav file for this phrase (because they don’t need to say it in the game) are simply skipped by not putting anything in between their corresponding commas. In our example, The “abort mission” phrase isn’t needed by the ATCs, so that is why there are 3 “,” toward the end of this line, corresponding to Voice12 (F) and Voice 13, the ATCs. The last is the “Summary” Phrase, which just lets you know what this line’s set of phrases is for - Abort Mission There is a comma after the last Abort Mission, phrase - and that is for the last element, “Eval”, which just wasn’t included in this line (leaving Eval off does not seem to cause any ill effects that I have found).
Then if you open the FragFile .xml, and find FragID 2, it will list:
<Frag id="2"> <Speaker voice="0" tlkId="26" /> <Speaker voice="1" tlkId="27" /> <Speaker voice="2" tlkId="28" /> <Speaker voice="3" tlkId="29" /> <Speaker voice="4" tlkId="30" /> <Speaker voice="5" tlkId="31" /> <Speaker voice="6" tlkId="32" /> <Speaker voice="7" tlkId="33" /> <Speaker voice="8" tlkId="34" /> <Speaker voice="9" tlkId="35" /> <Speaker voice="10" tlkId="36" /> <Speaker voice="11" tlkId="37" /> </Frag>
So you know exactly which VoiceID is recorded with each voice for this set of phrases.
If you were to decompress falcon.tlk (using TlkTool) into it’s 40,000+ .wav files, and listen to 26.wav, you’d hear “Abort Mission” (in Voice 00) and if you were to play 27.wav, you’d hear “Mission is aborted” in a different voice (Voice 01) etc.
But you really don’t have to go to all this trouble to map out 40,000+ .wav files…A 133+ coder named Khronik built a small tool called TalkToolGUI, which does all that work for you! How to use it is described above. Here’s a screenshot of what TlkToolGui looks like on one of the Theater projects I created:
Using TlkToolGUI, you can listen to every phrase in every voice if you wish. TlkToolGUI will even translate the F4Talk.csv to other languages (limited), though I haven’t tried that function myself. Note, however, that I don’t use TlkToolGUI for adding to, deleting from, compressing or decompressing falcon.tlk files. I use TlkTool itself using command line parameters as it’s more controllable and reliable (this is not Khronik’s fault - some stuff in TlkTool works and some stuff doesn’t seem to always work as advertised).
Nevertheless, TlkToolGUI is pretty slick, huh? So, Ricky, you don’t need to do the work, it’s already done for you
If you want a list of every phrase mapped with every VoiceID in a spreadsheet form, please PM me. I might be able to help.
Regards,
Tomcattwo
(VoiceClone) -
Thanks so much for the detailed explanation! I really appreciate it.
I’m sorry I probably didn’t phrase my question clearly. What I’m really looking for is whether the fragIDs can be pulled from shared memory somewhere while they’re being used to generate the audio. What I would like to try is to then use an external program to map them to the values in the csv file. The program could then use the phrase as input for different external text to speech engines.
It’s all just an experiment really. It would be so cool to be able to hear the ATC phrases we know so well spoken by a modern speech engine in real time.
-
@Ricky
Ahh I see. That is sort of the “next evolution” in Falcon Voice. That could mean also “on the fly” translation to different languages too.I am not privy to the code that drives BMS in memory, or even the evaluation code from command to response. So I can be of no help there.
Good luck on your project. Start a new thread in Sound subtopic once you get started
Regards,
Tomcattwo
(VoiceClone) -
Is real time AI voice cloning even worth it? I mean as many times as I’ve used it they often falter in keeping a steady pitch throughout the course of conversation. Not to mention the terrible lags and eventually my actual voice coming out at times (happened 1/10 times, pretty nig ratio I’d say)
-