Tomodachi Text to speech analysis/mod?

Discussion in '3DS - ROM Hacking, Translations and Utilities' started by xdarkmario, Sep 22, 2015.

  1. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    so now that im digging around in 3ds game files i was always wondering about replacing the Text to speech engine in tomodachi life.

    upon digging around in the files i found the folder thats responsible for the engine.

    a folder called libNTTS.
    so far
    inside the components_cmn_LZ.bin
    are 2 files
    lid.dat and synth_med_fxd_bet2f16.dat

    from what i gather is that lid.dat is all the voice data and the synth_med_fxd_bet2f16.dat is the module that alternates pitch, speed and variation of the voice.

    the components_enu_LZ.bin
    holds
    clc_enu_cfg1.dat
    clc_enu_samantha_cfg1.dat and
    select_samantha_bet2f16.dat

    searching that up shows that tomodachi is most likely using a known TTS engine called "depes tts"
    link Link2

    the dictionary_enu_LZ.bin holds a userdct_enu.dat that when opened in notepad++ are some words hence the name dictonary_enu
    the header_LZ.bin is not a container file but is instead directly read, it seems to be the header code/config for the engine as well as something to do with "British English-Serena (TTS)"

    and finally the last file is ruleset_enu_LZ.bin
    which holds a userruleset_enu.rst
    that simply has this in it

    Code:
    [header]
    language = ENU
    charset = utf-8
    
    [data]
    /\b(Who|Whom|Whose)(\s+[^.!]*?)\?/   -->   $1$2.
    /wii\-u/i   -->   "\\mw\\Wii U\\mw\\"
    /fils aime/i   -->   fils-aime
     


  2. duwen

    duwen Old Man Yoshi

    Member
    1,165
    649
    Sep 6, 2013
    United States
    Bullet Hell
    Interesting... any chance of replacing the text to speech engine with an NTR plugin?
     
  3. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    im not sure, i haven't used NTR for much.
     
  4. duwen

    duwen Old Man Yoshi

    Member
    1,165
    649
    Sep 6, 2013
    United States
    Bullet Hell
    Something I've wondered about with regards the speech in Tomodachi Life; the English speech in the EUR version has a definite British accent - is it the same in the US version, or does it have an American accent? If it's the latter it could be possible to 'patch in' other regions accents.
    Similarly, when you have an islander from somewhere like Japan or Korea visit your island it makes no attempt to translate names or messages via the text-to-speech - would it be possible to combine foreign dictionaries with the stock version to fix this?
     
  5. Dr.Hacknik

    Dr.Hacknik Maniac | Dev | A Fellow (lewd) Megumin

    Member
    1,173
    876
    Mar 26, 2014
    United States
    my lewd corner
    It would be cool to replace present One's with a more Realistic Voice.....It would probably be a little hard to port over though.
     
  6. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    Don't think so seeing how there only one set of language files for each ver. It's one or the other as far as I know
     
    Last edited by xdarkmario, Sep 22, 2015
  7. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    I may be pushing it but I want to replace with the windows tts. Or maybe the android os ver seeing how their simular.
     
    Last edited by xdarkmario, Sep 26, 2015
  8. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    Anyone find out any more about this?
     
  9. Calafska

    Calafska Newbie

    edit : It would be so nice for our rom-hack :yay3ds:

    damn im to tired
     
    LeafyIsHere likes this.
  10. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    I would love to replace the engine still. The android tts is pretty good but I'll have to decompile the android engine as well
     
  11. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    Yeah, I think the Google tts voices are higher quality than what comes with the depes engine.
     
    Calafska likes this.
  12. Calafska

    Calafska Newbie

    yes , I cant argue with that :)
    I would love to do that ^u^
     
  13. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    @xdarkmario @Calafska
    Cool, I just figured out what exactly those .bin "ENU" files are, and how they can be swapped out for higher quality versions.

    Tomodachi Life voices are created using low-quality versions of TTS voices from Nuance.
    I found a site that allows you to download a demo of any Nuance TTS voice (all are high-quality).
    Surprisingly, the computer TTS files are the same file-format as the Tomodachi Life speech files. (except they are HUGE compared)
    Here is my Tom US voice:
    Untitled.png
    I think someone COULD replace the 3DS Tomodachi speech files with the high quality ones,
    but the game would take up like 2 gigabytes.
     
    I pwned U! and xdarkmario like this.
  14. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    Interesting, Good find. In this age of mass storage 2gb are nothing. I might try this
     
  15. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    btw if you do try, Serena UK is the voice for the EUR version, and Samantha US is the US version's lol.
     
    I pwned U! likes this.
  16. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    also theres a file in there called
    clc_enu_samantha_cfg1.dat

    goggling that i found a source code

    Github

    and that points to some old android Motorola tts files.
    which is kinda odd because thats another engine.
    as well as another company called
    Nuance, a (TTS company)

    see here for some of there work. if we can at least replace it with this this would be cool
    http://codefactoryglobal.com/speech-technology/voice-licensing/
    dosent look free but its a example
     
    Last edited by xdarkmario, Jan 22, 2017
  17. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    Hmm, I am almost certain almost any SAPI TTS voice would work,
    I have been researching TTS voices and how they work, and it seems like almost every voice is the same file-format.

    All that we need now is a way to unpack and repack the .dat files in libNTTS.
    The EveryFileExplorer only unpacks them, sadly...
     
  18. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    well if we cant unpack them then maybe we need to inject mods into the files.
     
  19. LeafyIsHere

    LeafyIsHere Member

    Newcomer
    37
    16
    Aug 23, 2016
    United States
    Not sure how that would be done.
     
  20. xdarkmario
    OP

    xdarkmario Philosopher

    Member
    1,324
    304
    Dec 30, 2010
    United States
    Mushroom Kingdom
    I assume we would have to know the memory maps. Similar to how early smash bros mods were I think
     
    LeafyIsHere likes this.