GithubHelp home page GithubHelp logo

cmosvocf / ddb-extraction-1 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ain-soph/ddb-extraction

0.0 0.0 0.0 35 KB

Extract the samples of ddb/ddi soundbanks

License: MIT License

Python 100.00%

ddb-extraction-1's Introduction

ddb-extraction

python>=3.10

OneNote Link about ddi/ddb file strcutures:
https://1drv.ms/u/s!AgxVwvz3Kj1Ek49YzGjngt49krIZvQ

Extract the samples of ddb/ddi soundbanks.

Requirements

pip install pyyaml

Examples

python ./extract_wav.py --src_path ./XXX.ddb
python ./extract_ddi.py --src_path ./XXX.ddi
python ./rename_wav.py --work_dir ./XXX

FRM2 files are not necessary for the wav workflow, so only run the following command if you have special desire for the extracted frm2 files:

python ./extract_frm2.py --src_path ./XXX.ddb

Guide for Python Beginners

  1. Download and install miniconda
    At the end installation, remember to set conda init as yes (or run it manually).
  2. Create a python 3.10 environment by running conda create -n py310 python=3.10
  3. Activate your new environment: conda activate py310
  4. Install the required dependencies: pip install pyyaml
  5. Run the scripts following the previous example!

Usage:

usage: extract_ddi.py [-h] --src_path SRC_PATH

optional arguments:
  -h, --help           show this help message and exit
  --src_path SRC_PATH  source ddi file path
  --save_temp          save temp files
  --cat_only           only concat ddi.yml, assuming temp files exist.
usage: extract_wav.py [-h] --src_path SRC_PATH [--dst_path DST_PATH] [--merge] [--silence_interval SILENCE_INTERVAL]

optional arguments:
  -h, --help            show this help message and exit
  --src_path SRC_PATH   source ddb file path
  --dst_path DST_PATH   destination extract path, default to be "./[name]/wav.zip (merge.wav)"
  --merge               enable to generate a merged large wav file
  --silence_interval SILENCE_INTERVAL
                        silence interval seconds when "merge" is enabled, default to be 0
usage: extract_frm2.py [-h] --src_path SRC_PATH [--dst_path DST_PATH]

optional arguments:
  -h, --help           show this help message and exit
  --src_path SRC_PATH  source ddb file path
  --dst_path DST_PATH  destination extract path, default to be "./[name]/frm2.zip"
usage: rename_wav.py [-h] --work_dir WORK_DIR

optional arguments:
  -h, --help           show this help message and exit
  --work_dir WORK_DIR  working directory containing "ddi.yml" and "wav.zip".

ddi.yml

ddi.yml file strucutre:

{
  'vqm': {
          'vqm': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          }

  'sta': {
          'phoneme': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          'phoneme': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          }

  'art': {
          'phoneme[space]phoneme': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          'phoneme[space]phoneme': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          'phoneme[space]phoneme[space]phoneme': [
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
              {'snd': XXX, 'epr': [XXX,XXX,...]},
          ],
          }
}

ddb-extraction-1's People

Contributors

641i130 avatar ain-soph avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.