Git Product home page Git Product logo

dsc's Introduction

Phụ thuộc

Python 3.6

  • Tensorflow-gpu 1.2.1
  • Numpy
  • Soundfile
  • PyWorld
    • Cython

Cài đặt môi trường

  • Tạo thư mục chưa project (ví dụ dsc)
  • cd đên folder dsc
  • Tạo môi trường ảo: python3 -m venv venv
  • Cài đặt môi trường cần thiêt: pip install -r requirement.txt

Tiền xử lý dữ liệu

  • Chuyển đổi âm thanh được ghi âm (origin) định dạng m4a/mp3 sang wav, mono chanel + sr = 16kHz

Sử dụng

  1. Run analyzer.py để trích xuất đặc trưng và lưu các đặc trưng đó thành các file nhị phân (*.bin).
  2. Run build.py để lưu một số thông kê, chẳng hạn như cực trị phổ và pitch.
  3. Để huấn luyện mô hình, Run
python main.py --model ConvVAE --trainer VAETrainer --architecture architecture.json
  1. Model sau đó được lưu vào địa chỉ: ./logdir/train/[timestamp]
  2. Để chuyển đổi giọng nói, Run
python convert.py \
--src SM1 \
--trg TM1 \
--model ConvVAE \
--checkpoint logdir/train/[timestamp]/[model.ckpt-[id]] \
--file_pattern "./dataset/bin/Testing Set/{}/*.bin"

*Điền đủ tham số timestampemodel id.
5. Các file được chuyển đổi sau đó được lưu vào địa chỉ: ./logdir/output/[timestamp]


Bộ dữ liệu

  • Bộ dữ liệu được ghi âm bởi trình ghi âm của điện thoại Redmi Note 8 + Sol Prime T1000 + SS A8 Star.
  • Gồm có 4 speaker:
    • {SM1 - Giọng tôi - PXP}
    • {SM2 - Giọng anh tôi - PXĐ}
    • {TM1 - giọng nam trung}
    • {TM2 - giọng nam bắc}
  • Ghi âm 120 utterances / 1 người. Tổng cộng có 720 utterances

Mô hình

  • Variational Autoencoder (VAE)
  • Lossfuntion:
    • reconstruction loss (MSE/cross-entropy)
    • Kullback Leibler divergence loss
  • Metrics:
    • Mel Cepstal Distortion (MCD)
    • MOS score
    • speaker similarity

Cấu trúc file/folders

dataset
  bin
  wav
    Training Set
    Testing Set
      PXP
      PXD
      TBT
      PDH
etc
  speakers.tsv
  (xmax.npf)  
  (xmin.npf)  
util (submodule)
model
logdir
architecture*.json

analyzer.py    (feature extraction)
build.py       (stats collecting)
trainer*.py
main.py        (main script)
(validate.py)  (output converted spectrogram) 
convert.py     (conversion)

Định đạng dữ liệu nhị phân

Các đặc trưng của WORLD vocoder và nhãn (label) của người phát âm được lưu trữ ở định dạng nhị phân.
Format:

[[s1, s2, ..., s513, a1, ..., a513, f0, en, spk],
 [s1, s2, ..., s513, a1, ..., a513, f0, en, spk],
 ...,
 [s1, s2, ..., s513, a1, ..., a513, f0, en, spk]]

Trong đó:
s_i is spectral envelop magnitude (in log10) of the ith frequency bin,
a_i đặc trưng aperiodicity tương ứng,
f0 là tần số cơ bản/pitch (0 cho các frame không có âm thanh) en là năng lượng spk là chỉ số của người phát âm (0-3) và ssp.

Chú ý:

Nếu sử dụng Tensorflow-CPU, bạn thay thế tất cả toán tử NCHW trong source code thành NHWC

dsc's People

Contributors

phanxuanphucnd avatar

Stargazers

 avatar

Watchers

James Cloos avatar  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.