Skip to content

Commit ce83cc2

Browse files
committed
bug fixing
1 parent a085344 commit ce83cc2

File tree

3 files changed

+33
-13
lines changed

3 files changed

+33
-13
lines changed

README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,28 @@ This package provides:
1414

1515
Please visit [demo page](https://haoheliu.github.io/demopage-voicefixer/) to view what voicefixer can do.
1616

17+
## Usage
1718

18-
You can test audio samples on your desktop by running website (powered by [streamlit](https://streamlit.io/))
19-
20-
```
21-
# install additional web package
22-
$ pip install streamlit
23-
# you can run after installing voice_fixer package
24-
$ streamlit run test/streamlit.py
19+
Install voicefixer first:
20+
```shell script
21+
pip install voicefixer
2522
```
2623

24+
### Desktop App
2725

28-
## Usage
26+
You can test audio samples on your desktop by running website (powered by [streamlit](https://streamlit.io/))
27+
```shell script
28+
# Install additional web package
29+
pip install streamlit
30+
# Run streamlit
31+
streamlit run test/streamlit.py
32+
```
33+
**Important:** When you run the above command for the first time, the web page may leave blank for several minutes for downloading models. You can checkout the terminal for downloading progresses.
34+
2935

30-
### Basic example:
36+
### Python interface
37+
38+
Basic example:
3139

3240
```python
3341
# Will automatically download model parameters.
@@ -54,8 +62,8 @@ voicefixer.restore(input="", # input wav file path
5462
cuda=False, # whether to use gpu acceleration
5563
mode = 2) # You can try out mode 0, 1, 2 to find out the best result
5664

57-
58-
65+
# Another similar function
66+
# voicefixer.restore_inmem()
5967

6068
# Universal speaker independent vocoder
6169
vocoder = Vocoder(sample_rate=44100) # Only 44100 sampling rate is supported.

test/streamlit.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def init_voicefixer():
3737
if is_cuda != list(voice_fixer._model.parameters())[0].is_cuda:
3838
device = 'cuda' if is_cuda else 'cpu'
3939
voice_fixer._model = voice_fixer._model.to(device)
40+
else:
41+
is_cuda=False
4042

4143
t1 = time.time()
4244

test/test.py

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,16 @@
1414

1515
voicefixer = VoiceFixer()
1616

17-
voicefixer.restore(input="/Users/liuhaohe/Downloads/lieshi_short.wav",
18-
output="/Users/liuhaohe/Downloads/lieshi_short.wav",
17+
voicefixer.restore(input="/Users/liuhaohe/Downloads/vocals.wav",
18+
output="/Users/liuhaohe/Downloads/vocals_mode_0.wav",
19+
cuda=False,mode=0)
20+
21+
22+
voicefixer.restore(input="/Users/liuhaohe/Downloads/vocals.wav",
23+
output="/Users/liuhaohe/Downloads/vocals_mode_1.wav",
24+
cuda=False,mode=1)
25+
26+
27+
voicefixer.restore(input="/Users/liuhaohe/Downloads/vocals.wav",
28+
output="/Users/liuhaohe/Downloads/vocals_mode_2.wav",
1929
cuda=False,mode=2)

0 commit comments

Comments
 (0)