# I found out the format of samples in VOCALOID 2, 3 and 4 voicebanks. Now what?



## Deleted User (Oct 23, 2015)

I was screwing around with some .DDB files from multiple VOCALOID voicebanks in Audacity, and in doing this I discovered the encoding and sample rate of the samples inside of the .DDB files. They all use 32 bit PCM encoding, have one channel, and have a sampling rate of 22050 Hz.
Before the samples, there's some chunk of data, I don't know what it is, but I'm guessing it's maybe a sample identifier of some sort, or something like that?
I don't really know what I should do now.


----------



## VinsCool (Oct 23, 2015)

Go past the chunk, dump everything in a new .wav file, and then have fun by separing samples one by one?


----------



## Deleted User (Oct 23, 2015)

VinsCool said:


> Go past the chunk, dump everything in a new .wav file, and then have fun by separing samples one by one?


That's what I've been doing, but it'd be nice to be able to do more with the samples and stuff, like maybe replacing samples, but I don't think I'll be able to make a semi-functional voicebank edit just by doing that, in fact, the voicebank may not be functional at all.


----------



## deepsearegret (Oct 21, 2017)

Sorry for bothering, but I tried this myself, is it supposed to be in big eridian, small eridian, ect?


----------



## Deleted User (Oct 21, 2017)

deepsearegret said:


> Sorry for bothering, but I tried this myself, is it supposed to be in big eridian, small eridian, ect?


I've found that the endianness doesn't matter for whatever reason. Just choose whichever.


----------



## RosyKitteh (Aug 22, 2019)

It's possible to export a DDB file to multiple WAV files. It's an unconventional archive file.


----------



## Carrot (Dec 22, 2019)

uwu


----------



## myrsky (Jan 16, 2020)

I've been messing around with this lately in Audacity and a hex editor trying to figure out more about the .ddb. No guarantees any of this applies to anything but V3, as that's all I currently have access to. Here's what I've found:
The actual samples begin with SND (53 4E 44) and end with FRM2h, (46 52 4D 32 68 2C). If you take the stuff between those and put it in a new file, it will be just the samples.

I've also encountered FRM2 followed by other symbols, which seems to be related to something else, as they don't mark the end of samples, but I'm not yet sure what.

Edit: It might be a bit less straightforward than that, as I've been writing a program to extract samples from the .ddb and encountered some odd stuff. I have managed to use it to successfully extract a sample, but the program still needs a bit more work, and it might be a bit since I'm pretty new to coding.

Edit: Okay, disregard most of that stuff up there. It's only partially correct. Seems samples can end with FRM2-whatever, not just FRM2h,. Also, SND has to be at the beginning of the file for Audacity to read it properly as raw data, otherwise it's just static. Which doesn't make a lot of sense to me, but admittedly I have very little experience with this sound stuff. 

Also, I can confirm that this applies to V2, V3, and V4 files. It works with V5 too, but the .ddb files are too big for my program to handle, and while I'm sure there's a way around that, I'm not good enough at this whole programming thing yet to know what it is.


Carrot said:


> Did anyone actually get this working? I'm having trouble with audacity importing it incorrectly.



The import settings should look like this:




Edit: Depending on what version of Vocaloid you're working with, you might want to make sure you have the right .ddb, as some have other .ddb files. The one you want should be (vocaloid name).ddb.


----------



## CV01 (Jan 29, 2020)

Edit: Ignore what I said below.  Turns out I did import correctly and that static I was hearing was the chunk of data before the sample that OP was talking about.  I'll mess around with the .ddb in a hex editor and if I can manage to separate the samples.  If anyone know a more efficient way to do this, please let me know.

Sorry, I'm a little confused on what I'm supposed to do with the .ddb in the hex editor to get things imported into audacity correctly.  I've been lurking around quite some time now and made an account just to ask since I'm attempting doing this.  So far, all I've managed to do is import the .ddb with the above settings and get static, haha.  I know I'm using the right .ddb since it says (vocaloid's name).ddb.

I'm sorry if I sound like a total noob.


----------



## myrsky (Jan 30, 2020)

CV01 said:


> If anyone know a more efficient way to do this, please let me know.


I finished writing that program. This _should_ extract most, if not all (if it misses one, it'll probably be at the end) of the samples in a .ddb file, though you'll still have to import them as raw data in Audacity. I can't publish it and upload that since it's too big, so I'll just post the source.
Also, fair warning, this will fill whatever folder you run it in with a bunch of files. I was kind of surprised just how many there were, actually.

Edit: I might rewrite this in Python since that would probably be more convenient for people. Either way, I'm going to work on saving the samples as .wav.


----------



## Carrot (Feb 17, 2020)

uwu


----------



## CV01 (Feb 17, 2020)

Carrot said:


> I have an idea! Lets open a github for vocaloid sample manipulation! It'd be really cool what we might be able to do with the samples. I've been really interested in making a TTS Miku program or better yet, A Miku Voice Assistant though I have no idea how this would work.


I think that's a lovely idea!    Just as long as we're not distributing the samples, that should be okay legally!  I've seen nothing against that in the ToU, iirc. ^u^


Carrot said:


> Because my account is new just copy and paste that. They don't let me post links.
> discord.gg/FzB49rq


That's also a really great idea! ^u^  I may consider joining, but I don't know the first thing about coding. ^^"


----------



## Carrot (Feb 17, 2020)

uwu


----------



## Carrot (Jun 9, 2020)

uwu


----------



## X3113 (Dec 20, 2020)

can someone help me how to use this program to convert them? I really don't know what to do ><

--------------------- MERGED ---------------------------



myrsky said:


> I finished writing that program. This _should_ extract most, if not all (if it misses one, it'll probably be at the end) of the samples in a .ddb file, though you'll still have to import them as raw data in Audacity. I can't publish it and upload that since it's too big, so I'll just post the source.
> Also, fair warning, this will fill whatever folder you run it in with a bunch of files. I was kind of surprised just how many there were, actually.
> 
> Edit: I might rewrite this in Python since that would probably be more convenient for people. Either way, I'm going to work on saving the samples as .wav.



how can I use this?


----------



## Carrot (Feb 17, 2021)

uwu


----------



## apleGBA (May 29, 2021)

Does anyone know who to use the program? I am having trouble with it.


----------



## apleGBA (May 30, 2021)

apleGBA said:


> Does anyone know who to use the program? I am having trouble with it.


nvm i got it to work


----------



## Kettle (Jun 20, 2021)

apleGBA said:


> nvm i got it to work


 how'd you get it to work?? i'm struggling a lot over here lmao


----------



## probablyray (Jul 29, 2022)

Is there any way to edit then re export the wav files as dbb files?


----------



## probablyray (Jul 29, 2022)

edit-posted twice sorry.


----------



## undertheshed (Dec 9, 2022)

It seems like I encountered a program that allows you to accomplish the exact thing while having more additional components on GitHub, it's called VAU/Vocaloid Archive Utility.


----------



## undertheshed (Dec 13, 2022)

It will be interesting if we can repack wave files to Vocaloid .ddb format though...


----------

