Download example.py from Scicom-intl/voice-isolator-cpu: direct link, hf CLI and curl.
- Browser
- Download file 319 Bytes
-
https://huggingface.co/Scicom-intl/voice-isolator-cpu/resolve/main/example.py
- Command line
-
hf download hf://Scicom-intl/voice-isolator-cpu/example.py
-
curl -L -o example.py https://huggingface.co/Scicom-intl/voice-isolator-cpu/resolve/main/example.py
319 Bytes
| """python example.py in.wav out.wav: isolate the caller of a 16 kHz mono recording, live, on the CPU.""" | |
| import sys | |
| import soundfile as sf | |
| from voice_isolator import isolate | |
| x, sr = sf.read(sys.argv[1], dtype="float32") | |
| assert sr == 16000 and x.ndim == 1, "16 kHz mono" | |
| sf.write(sys.argv[2], isolate(".", x), 16000) | |