Skip to content

Commit 96ccb59

Browse files
authored
16khz (#56)
* update readme about 8k * update world * typo
1 parent 3d260a9 commit 96ccb59

2 files changed

Lines changed: 54 additions & 42 deletions

File tree

README.md

Lines changed: 53 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
1-
# PyWorldVocoder - A Python wrapper for World Vocoder
1+
# PyWORLD - A Python wrapper of WORLD Vocoder
22

33

44
| **`Linux`** | **`Windows`** |
55
|-----------------|-----------|
66
| [![Build Status](https://travis-ci.org/JeremyCCHsu/Python-Wrapper-for-World-Vocoder.svg?branch=master)](https://travis-ci.org/JeremyCCHsu/Python-Wrapper-for-World-Vocoder) | [![Build Status](https://ci.appveyor.com/api/projects/status/github/JeremyCCHsu/Python-Wrapper-for-World-Vocoder?svg=true)](https://ci.appveyor.com/project/JeremyCCHsu/python-wrapper-for-world-vocoder) |
77

88

9-
Morise's World Vocoder is a fast and high-quality vocoder.
10-
World Vocoder parameterizes speech into three components:
9+
WORLD Vocoder is a fast and high-quality vocoder
10+
which parameterizes speech into three components:
1111

12-
1. Pitch (fundamental frequency, F0) contour
13-
2. Harmonic spectral envelope
14-
3. Aperiodic spectral envelope (relative to the harmonic spectral envelope)
12+
1. `f0`: Pitch contour
13+
2. `sp`: Harmonic spectral envelope
14+
3. `ap`: Aperiodic spectral envelope (relative to the harmonic spectral envelope)
1515

16-
It can also resynthesize speech using these features (see examples below).
16+
It can also (re)synthesize speech using these features (see examples below).
1717

18-
For more information, please visit [Morise's World repository](https://github.com/mmorise/World)
19-
and the [official website of World Vocoder](http://ml.cs.yamanashi.ac.jp/world/english/)
18+
For more information, please visit Dr. Morise's [WORLD repository](https://github.com/mmorise/World)
19+
and the [official website of WORLD Vocoder](http://ml.cs.yamanashi.ac.jp/world/english)
2020

2121

22-
## I. APIs
22+
## APIs
2323

2424
### Vocoder Functions
2525
```python
@@ -28,25 +28,29 @@ _f0, t = pw.dio(x, fs) # raw pitch extractor
2828
f0 = pw.stonemask(x, _f0, t, fs) # pitch refinement
2929
sp = pw.cheaptrick(x, f0, t, fs) # extract smoothed spectrogram
3030
ap = pw.d4c(x, f0, t, fs) # extract aperiodicity
31-
y = pw.synthesize(f0, sp, ap, fs)
31+
32+
y = pw.synthesize(f0, sp, ap, fs) # synthesize an utterance using the parameters
3233
```
3334

3435

3536
### Utility
3637
```python
37-
# Convert speech into features (using default options)
38+
# Convert speech into features (using default arguments)
3839
f0, sp, ap = pw.wav2world(x, fs)
3940
```
4041
<br/>
4142

43+
You can change the default arguments of the function, too.
44+
See more info using `help`.
45+
4246

43-
## II. Installation
47+
## Installation
4448

45-
### Pip installation
49+
### Using Pip
4650
`pip install pyworld`
4751
<br/>
4852

49-
### Installing from Github
53+
### Building from Source
5054
```bash
5155
git clone https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder.git
5256
cd Python-Wrapper-for-World-Vocoder
@@ -58,6 +62,8 @@ pip install .
5862
It will automatically `git clone` Morise's World Vocoder (C++ version).<br/>
5963
(It seems to me that using `virtualenv` or `conda` is the best practice.)<br/>
6064
<br/>
65+
66+
### Installation Validation
6167
You can validate installation by running
6268
```bash
6369
cd demo
@@ -66,37 +72,25 @@ python demo.py
6672
to see if you get results in `test/` direcotry.
6773
(Please avoid writing and executing codes in the `Python-Wrapper-for-World-Vocoder` folder for now.)<br/>
6874

69-
### Other Installation Suggestions
70-
1. Use `pip install .` is safer and you can easily uninstall pyworld by `pip uninstall pyworld`
71-
- For Mac users: You might need to do `MACOSX_DEPLOYMENT_TARGET=10.9 pip install .` See [issue](https://github.com/SeanNaren/warp-ctc/issues/129#issuecomment-502349652).
72-
2. Another way to install pyworld is via<br/>
73-
`python setup.py install`<br/>
74-
- Add `--user` if you don't have root access<br/>
75-
- Add `--record install.txt` to track the installation dir<br/>
76-
3. If you just want to try out some experiments, execute<br/>
77-
`python setup.py build_ext --inplace`<br/>
78-
Then you can use PyWorld from this directory.<br/>
79-
You can also copy the resulting **pyworld.so** (pyworld.{arch}.pyd on Windows) file to
80-
`~/.local/lib/python2.7/site-packages` (or corresponding Windows directory)
81-
so that you can use it everywhere like an installed package.<br/>
82-
Alternatively you can copy/symlink the compiled files using pip, e.g. `pip install -e .`
83-
8475
### Environment/Dependencies
8576
- Operating systems
86-
- Linux Ubuntu 16.04/14.04
77+
- Linux Ubuntu 14.04+
8778
- Windows (thanks to [wuaalb](https://github.com/wuaalb))
79+
- WSL
8880
- Python
8981
- 2.7 (Windows is currently not supported)
9082
- 3.7/3.6/3.5
91-
- Required packages
92-
- Cython 0.24 (or later versions; required)
93-
- Numpy
94-
- Optional (for demo.py only)
95-
- argparse
96-
- pysoundfile
97-
- Matplotlib
9883

99-
You can simply install these by `pip install -r requirements.txt`
84+
You can install dependencies these by `pip install -r requirements.txt`
85+
86+
87+
88+
## Notice
89+
- WORLD vocoder is designed for speech sampled ≥ 16 kHz.
90+
Applying WORLD to 8 kHz speech will fail.
91+
See a possible workaround [here](https://github.com/JeremyCCHsu/Python-Wrapper-for-World-Vocoder/issues/54).
92+
- When the SNR is low, extracting pitch using `harvest` instead of `dio`
93+
is a better option.
10094

10195

10296
## Troubleshooting
@@ -124,9 +118,27 @@ You can simply install these by `pip install -r requirements.txt`
124118
- scipy.io.wavfile.read (but this gives you `short`)
125119
- scipy.io.wavfile.write
126120

127-
## TODO List
121+
4. If you have installation issue on Windows, I probably could not provide
122+
much help because my development environment is Ubuntu
123+
and Windows Subsystem for Linux ([read this if you are interested in installing it](https://github.com/JeremyCCHsu/wsl)).
124+
125+
126+
### Other Installation Suggestions
127+
1. Use `pip install .` is safer and you can easily uninstall pyworld by `pip uninstall pyworld`
128+
- For Mac users: You might need to do `MACOSX_DEPLOYMENT_TARGET=10.9 pip install .` See [issue](https://github.com/SeanNaren/warp-ctc/issues/129#issuecomment-502349652).
129+
2. Another way to install pyworld is via<br/>
130+
`python setup.py install`<br/>
131+
- Add `--user` if you don't have root access<br/>
132+
- Add `--record install.txt` to track the installation dir<br/>
133+
3. If you just want to try out some experiments, execute<br/>
134+
`python setup.py build_ext --inplace`<br/>
135+
Then you can use PyWorld from this directory.<br/>
136+
You can also copy the resulting **pyworld.so** (pyworld.{arch}.pyd on Windows) file to
137+
`~/.local/lib/python2.7/site-packages` (or corresponding Windows directory)
138+
so that you can use it everywhere like an installed package.<br/>
139+
Alternatively you can copy/symlink the compiled files using pip, e.g. `pip install -e .`
140+
128141

129-
- [ ] Realtime synthesizer
130142

131143
## Acknowledgement
132144
Thank all contributors ([tats-u](https://github.com/tats-u), [wuaalb](https://github.com/wuaalb), [r9y9](https://github.com/r9y9), [rikrd](https://github.com/rikrd), [kudan2510](https://github.com/kundan2510)) for making this repo better and [sotelo](https://github.com/sotelo) whose [world.py](https://github.com/sotelo/world.py) inspired this repo.<br/>

lib/World

Submodule World updated 1 file

0 commit comments

Comments
 (0)