You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+9-3Lines changed: 9 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -120,7 +120,7 @@ This script requires numpy, soundfile, and pyworld to be installed in your Pytho
120
120
This script generates `.frq` files using the Harvest F0 estimation algorithm from WORLD. It uses Python's multiprocessing module to speed up the process of generating `.frq` files. This script is definitely not restricted to usage for NNSVS only, as you can use it to make `.frq` files for your UTAU voicebanks as well. You may also drag and drop the folder over the script file to run it, or use the terminal to run it.
Generate .frq files using WORLD's Harvest F0 estimation algorithm.
126
126
@@ -129,17 +129,21 @@ positional arguments:
129
129
130
130
optional arguments:
131
131
-h, --help show this help message and exit
132
-
--single-thread, -s Run single threaded
133
132
--num-threads NUM_THREADS, -n NUM_THREADS
134
-
How many threads to use. Default is a third of your thread count.
133
+
How many threads to use. Default is running single threaded. Input zero to use all available
134
+
threads.
135
135
```
136
136
137
137
This script also requires numpy, pyworld and soundfile.
138
138
139
+
**WARNING:** It seems to be generally safer to run `harvest_frq` without threading, as Harvest itself is quite CPU-intensive. If you think you can run it with multiple threads you may do it, but remember that ***you are willingly putting your computer at risk by doing so.***
140
+
139
141
**UPDATE 12/13/2022:** Made this script support making a `.frq` file for a single `.wav` file through the same drag and drop behavior.
140
142
141
143
**UPDATE 06/14/2023:** Added an optional argument to limit the number of threads used and switched to `soundfile` for reading `.wav` files.
142
144
145
+
**UPDATE 06/21/2023:** Default to running without threading. Read warning as to why.
146
+
143
147
### threaded_noise_remove.py
144
148
145
149
This script uses the Log-MMSE algorithm to denoise all `.wav` files in a folder, including its subfolders. It assumes that the first 120ms of each sample is noise. Performance is also dependent on the noise type as this is still an algorithmic noise remover.
@@ -162,6 +166,8 @@ optional arguments:
162
166
163
167
This script requires numpy, scipy and soundfile. The Log-MMSE implementation is a direct translation of [this MATLAB code](https://raw.githubusercontent.com/braindead/Noise-reduction/master/logmmse.m) into Python.
164
168
169
+
**Slight WARNING:**`threaded_noise_remove` seems to be quite safe even with threading, but please do check if your CPU can handle it.
170
+
165
171
**UPDATE 12/13/2022:** Made this script support denoising a single `.wav` file through the same drag and drop behavior.
166
172
167
173
**UPDATE 06/14/2023:** Added an optional argument to limit the number of threads used and switched to `soundfile` for dealing with `.wav` files.
logging.info(f'Whole operation took {t-t0:.3f} seconds.')
@@ -102,8 +104,7 @@ def process_directory(args):
102
104
try:
103
105
parser=ArgumentParser(description="Generate .frq files using WORLD's Harvest F0 estimation algorithm.")
104
106
parser.add_argument('path', help='The path to a .wav file or a directory with .wav files.')
105
-
parser.add_argument('--single-thread', '-s', action='store_true', help='Run single threaded')
106
-
parser.add_argument('--num-threads', '-n', type=int, default=os.cpu_count() //3, help='How many threads to use. Default is a third of your thread count.')
107
+
parser.add_argument('--num-threads', '-n', type=int, default=1, help='How many threads to use. Default is running single threaded. Input zero to use all available threads.')
0 commit comments