Skip to content

Instantly share code, notes, and snippets.

@bruvio
Forked from carankt/Useful_CMD_Ubuntu.md
Created March 25, 2022 07:44
Show Gist options
  • Select an option

  • Save bruvio/f0bc35512ea99b6c0aa069820ceceb6e to your computer and use it in GitHub Desktop.

Select an option

Save bruvio/f0bc35512ea99b6c0aa069820ceceb6e to your computer and use it in GitHub Desktop.

If you edit or create a file in windows and try to use it in Linux, we will have "\r\n" instead of "\n" at the EOL

to remove this error

sed -i 's/\r//g' good_wav.txt

Extract a .tar.gz file to a specific folder

tar -xf archive.tar.gz -C /home/linuxize/files

link

install git

sudo apt update
sudo apt install git

link

Remove a Non-Empty Folder

sudo rm -r folderName

MFA 1.1.0 on Ubuntu 18.04

MontrealCorpusTools/Montreal-Forced-Aligner#149
MontrealCorpusTools/Montreal-Forced-Aligner#109
If the above links dont work, try a lower version of the MFA

align.py:60: YAMLLoadWarning: calling yaml.load() without Loader=... is deprecated, as the default Loader is unsaf e. Please read https://msg.pyyaml.org/load for full details. Setting up corpus information... 213 wav file(s) were ignored because neither a .lab file or a .TextGrid file could be found, please see /root/Docu ments/MFA/wavs/logging/corpus.log for more information Number of speakers in corpus: 1, average number of utterances per speaker: 22753.0 /mnt/Karan/montreal-forced-aligner/lib/aligner/models.py:87: YAMLLoadWarning: calling yaml.load() without Loader=. .. is deprecated, as the default Loader is unsafe. Please read https://msg.pyyaml.org/load for full details. Creating dictionary information... Setting up training data... Calculating MFCCs... Calculating CMVN... Number of speakers in corpus: 1, average number of utterances per speaker: 22753.0 Done with setup. 100%|██████████████████████████████████████████████████████████████████████████████| 2/2 [31:36<00:00, 946.29s/it] Done! Everything took 9040.11528968811 seconds

#first error copy the contents of the file, use --remove-destination if used to create a link from the two files
sudo cp lib/libpython3.6m.so.1.0 lib/libpython3.6m.so --remove-destination

#mfcc error
sudo apt install libopenblas-dev
rm -rf ./lib/thirdparty/bin/libopenblas.so.0

For Librosa import not working

resemble-ai/Resemblyzer#5

pip3 install numba==0.48
sudo apt-get install libsndfile1-dev

to remove a list of files from a directory

cat bad_file.txt | xargs -i rm ./data/pitch/{}.npy

count the number of files in a directory

ls | wc -l

zip and unzip files

zip -r example.zip original_folder
zip -r folder/add/here/example.zip original_folder
unzip default.zip output_folder

Unrar a file

https://linuxhint.com/extract_rar_files_ubuntu/

unrar e filname.rar path/

Deletee files from dir with a specific extention

find . -name "*.bak" -type f -delete

Copy files with names in a list from original path to new path

xargs -I % --arg-file=file_wav.txt cp /mnt/rishikesh/data/extramarks_female_eng/wavs/% /mnt/rishikesh/data/extramarks_female_eng/gta_wavs/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment