rakuri255 / UltraSinger

AI based tool to convert vocals lyrics and pitch from music to autogenerate Ultrastar Deluxe, Midi and notes. It automatic tapping, adding text, pitch vocals and creates karaoke files.
MIT License
230 stars 19 forks source link

Hyphenation does not work on WSL with languages that differ from the Host System #147

Open LanceAkaLance opened 2 weeks ago

LanceAkaLance commented 2 weeks ago

I tried multiple different songs and forcing them to use English, Italian and German as a language for transcription. Every single time they had an error while hyphenating unless the language was set to German.

Everything else works properly (except for torch throwing warnings that my kernel does not support NUMA, which seems to be a common issue for WSL users but apparantly can be ignored).

I am running UltraSinger on WSL Ubuntu. The Host-System is WIndows 11 Pro 23H2. My system language for Windows is German but the VM is in English. Its running Ubuntu 22.0.4 LTS.

I have tried reinstalling the models and python modules and still got the same results.

These are my locale settings for Ubuntu LANG=C.UTF-8 LANGUAGE= LC_CTYPE="C.UTF-8" LC_NUMERIC="C.UTF-8" LC_TIME="C.UTF-8" LC_COLLATE="C.UTF-8" LC_MONETARY="C.UTF-8" LC_MESSAGES="C.UTF-8" LC_PAPER="C.UTF-8" LC_NAME="C.UTF-8" LC_ADDRESS="C.UTF-8" LC_TELEPHONE="C.UTF-8" LC_MEASUREMENT="C.UTF-8" LC_IDENTIFICATION="C.UTF-8" LC_ALL=

BanCrash commented 2 weeks ago

Hyphenation is not working for me neither on Windows using english, while my computer language is spanish, so it seems that is not only related to WSL.

rakuri255 commented 2 weeks ago

@LanceAkaLance can you post you log pls

LanceAkaLance commented 2 weeks ago

Ran it on my laptop using WSL, same result

(.venv) root@Laptop-G10:~/UltraSinger# python3.10 ./src/UltraSinger.py -i https://www.youtube.com/watch?v=9PNCVVrs7gk --
whisper small

[UltraSinger] *****************************
[UltraSinger] UltraSinger Version: 0.0.11-dev4
[UltraSinger] *****************************
[UltraSinger] Checking GPU support for tensorflow and pytorch.
2024-06-20 10:54:15.514527: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcuda.so.1'; dlerror: libcuda.so.1: cannot open shared object file: No such file or directory
2024-06-20 10:54:15.514563: W tensorflow/stream_executor/cuda/cuda_driver.cc:269] failed call to cuInit: UNKNOWN ERROR (303)
2024-06-20 10:54:15.514657: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (Laptop-G10): /proc/driver/nvidia/version does not exist
[UltraSinger] tensorflow - there are no cuda devices available -> Using cpu.
[UltraSinger] pytorch - there are no cuda devices available -> Using cpu.
[UltraSinger] full automatic mode
[youtube] Extracting URL: https://www.youtube.com/watch?v=9PNCVVrs7gk
[youtube] 9PNCVVrs7gk: Downloading webpage
[youtube] 9PNCVVrs7gk: Downloading ios player API JSON
[youtube] 9PNCVVrs7gk: Downloading tv embedded player API JSON
[youtube] 9PNCVVrs7gk: Downloading web embedded client config
[youtube] 9PNCVVrs7gk: Downloading player 84314bef
[youtube] 9PNCVVrs7gk: Downloading web embedded player API JSON
[UltraSinger] Searching song in musicbrainz
[UltraSinger] cant find title everything is a lot in will wood and the tapeworms  dr sunshine is dead official video
[UltraSinger] No match found
[UltraSinger] Creating output folder. -> /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)
[UltraSinger] Downloading Audio
[youtube] Extracting URL: https://www.youtube.com/watch?v=9PNCVVrs7gk
[youtube] 9PNCVVrs7gk: Downloading webpage
[youtube] 9PNCVVrs7gk: Downloading ios player API JSON
[youtube] 9PNCVVrs7gk: Downloading tv embedded player API JSON
[youtube] 9PNCVVrs7gk: Downloading web embedded client config
[youtube] 9PNCVVrs7gk: Downloading player 84314bef
[youtube] 9PNCVVrs7gk: Downloading web embedded player API JSON
[info] 9PNCVVrs7gk: Downloading 1 format(s): 251
[download] Destination: /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video)
[download] 100% of    4.98MiB in 00:00:00 at 7.49MiB/s
[ExtractAudio] Destination: /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).mp3
Deleting original file /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (pass -k to keep)
[UltraSinger] Downloading Video
[youtube] Extracting URL: https://www.youtube.com/watch?v=9PNCVVrs7gk
[youtube] 9PNCVVrs7gk: Downloading webpage
[youtube] 9PNCVVrs7gk: Downloading ios player API JSON
[youtube] 9PNCVVrs7gk: Downloading tv embedded player API JSON
[youtube] 9PNCVVrs7gk: Downloading web embedded client config
[youtube] 9PNCVVrs7gk: Downloading player 84314bef
[youtube] 9PNCVVrs7gk: Downloading web embedded player API JSON
[info] 9PNCVVrs7gk: Downloading 1 format(s): 137
[download] Destination: /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).mp4
[download] 100% of  113.63MiB in 00:00:11 at 9.53MiB/s
[UltraSinger] Downloading thumbnail
[youtube] Extracting URL: https://www.youtube.com/watch?v=9PNCVVrs7gk
[youtube] 9PNCVVrs7gk: Downloading webpage
[youtube] 9PNCVVrs7gk: Downloading ios player API JSON
[youtube] 9PNCVVrs7gk: Downloading tv embedded player API JSON
[youtube] 9PNCVVrs7gk: Downloading web embedded client config
[youtube] 9PNCVVrs7gk: Downloading player 84314bef
[youtube] 9PNCVVrs7gk: Downloading web embedded player API JSON
[UltraSinger] Creating output folder. -> /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/cache
[UltraSinger] Separating vocals from audio with demucs and cpu as worker.
Important: the default model was recently changed to `htdemucs` the latest Hybrid Transformer Demucs model. In some cases, this model can actually perform worse than previous models. To get back the old default model use `-n mdx_extra_q`.
Selected model is a bag of 1 models. You will see that many progress bars per track.
Separated tracks will be stored in /root/UltraSinger/separated/htdemucs
Separating track /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).mp3
100%|██████████████████████████████████████████████| 327.59999999999997/327.59999999999997 [04:02<00:00,  1.35seconds/s]
[UltraSinger] Converting wav to mp3
[UltraSinger] Reduce noise from vocal audio with ffmpeg.
[UltraSinger] Converting audio for AI
[UltraSinger] Mute audio parts with no singing
[UltraSinger] Loading whisper with model small and cpu as worker
vocabulary.txt: 100%|████████████████████████████████████████████████████████████████| 460k/460k [00:00<00:00, 4.28MB/s]
config.json: 100%|█████████████████████████████████████████████████████████████████| 2.37k/2.37k [00:00<00:00, 10.1MB/s]
tokenizer.json: 100%|██████████████████████████████████████████████████████████████| 2.20M/2.20M [00:00<00:00, 6.88MB/s]
model.bin: 100%|█████████████████████████████████████████████████████████████████████| 484M/484M [00:49<00:00, 9.76MB/s]
No language specified, language will be first be detected for each audio file (increases inference time).
Lightning automatically upgraded your loaded checkpoint from v1.5.4 to v2.3.0. To apply the upgrade to your files permanently, run `python -m pytorch_lightning.utilities.upgrade_checkpoint ../.cache/torch/whisperx-vad-segmentation.bin`
Model was trained with pyannote.audio 0.0.1, yours is 3.1.1. Bad things might happen unless you revert pyannote.audio to 0.x.
Model was trained with torch 1.10.0+cu102, yours is 2.0.1+cu117. Bad things might happen unless you revert torch to 1.x.
[UltraSinger] Transcribing /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/cache/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video)_mute.wav
Detected language: en (0.80) in first 30s of audio...
[UltraSinger] Hyphenate using language code: en
[UltraSinger] Error in hyphenation for language  en, maybe you want to disable it?
[UltraSinger] Removing silent parts from transcription data
[UltraSinger] Pitching with crepe and model full and cpu as worker
2024-06-20 11:01:11.515026: I tensorflow/core/platform/cpu_feature_guard.cc:193] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2 FMA
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
1007/1007 [==============================] - 279s 277ms/step
[UltraSinger] Creating midi notes from pitched data
[UltraSinger] Creating Ultrastar notes from midi data
[UltraSinger] BPM is 130.81
[UltraSinger] Creating /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).txt from transcription.
[UltraSinger] Calculating silence parts for linebreaks.
[UltraSinger] Creating /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) [Karaoke].txt from transcription.
[UltraSinger] Calculating silence parts for linebreaks.
[UltraSinger] Parse ultrastar txt -> /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).txt
[UltraSinger] Calculating Ultrastar Points
[UltraSinger] Simple (octave high ignored) points
[UltraSinger] Total: 5709, notes: 5233, line bonus: 476, golden notes: 0
[UltraSinger] Accurate (octave high matches) points:
[UltraSinger] Total: 5695, notes: 5219, line bonus: 476, golden notes: 0
[UltraSinger] Creating Midi with pretty_midi
[UltraSinger] Creating midi instrument from Ultrastar txt
[UltraSinger] Creating midi file -> /root/UltraSinger/output/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video) (1)/Will Wood and the Tapeworms - Dr. Sunshine is Dead (Official Video).mid