GO-WORLD is a Go port to WORLD - a high-quality speech analysis, modification and synthesis system. WORLD provides a way to decompose a speech signal into:
- Fundamental frequency (F0)
- spectral envelope
- aperiodicity
and re-synthesize a speech signal from these paramters. See here for the original WORLD.
- Linux
- Mac OS X
Note that the original WORLD works in windows as well. In order to use WORLD in windows, you have to build WORLD yourself since currently we don't have a installation script.
First you need to install WORLD as a shared library:
git clone https://github.com/r9y9/WORLD.git && cd world
git checkout v0.2.1-3
./waf configure && ./waf
sudo ./waf install
go get github.com/r9y9/go-world
complete!
Import the package
import "github.com/r9y9/go-world"
and create a world instance with sample rate [hz] and frame period [ms].
w := world.New(sampleRate, framePeriod) // e.g. (44100, 5)
and then you can do whatever you want with WORLD.
timeAxis, f0 := w.Dio(input, w.NewDioOption()) // default option is used
refinedF0 := w.StoneMask(input, timeAxis, f0)
spectrogram := w.CheapTrick(input, timeAxis, f0)
apiriodicity := w.D4C(input, timeAxis, f0)
w.Synthesis(f0, spectrogram, apiriodicity, len(input))
Modified-BSD