MyNixOS website logo
Description

Tools for Voice Analysis, Speaker Recognition and Mood Inference.

Tools for voice analysis, speaker recognition and mood inference. Gathers 'R' and 'Python' tools to solve problems concerning voice and audio in general.

voice

R build status

General tools for voice analysis. The voice package is being developed to be an easy-to-use set of tools to deal with audio analysis in R.
It is based on wrassp, tuneR, seewave, gm, as well as Parselmouth - a Python library for the Praat software - and pyannote-audio - an open-source toolkit written in Python for speaker diarization based on PyTorch machine learning framework.

More details may be found at https://cran.r-project.org/package=voice.

Ubuntu Installation

The following steps were used to configure github.com/filipezabala/voice on Ubuntu 20.04 LTS (Focal Fossa). Note the software versions during installation, inconsistency reporting is welcome.

Without the following Python items 3 and 10, you may run all the functions except poetry and extract_features_py, that run respectively pyannote-audio and Parselmouth.

1. Curl

Command line tool and library for transferring data with URLs. Find the latest version at https://curl.se/download.html. At terminal run:

# removing (if necessary) old curl installation
sudo apt remove curl
sudo apt purge curl
# removing (if necessary) the /cdrom folder
sudo sed -i '/cdrom/d' /etc/apt/sources.list
# installing dependencies
sudo apt-get update
sudo apt-get install -y libssl-dev autoconf libtool make
cd /usr/local/src
rm -rf curl*
# downloading latest version (check before install!)
sudo wget https://curl.se/download/curl-7.81.0.zip
sudo unzip curl-7.81.0.zip
cd curl-7.81.0
sudo apt-get install autoconf
sudo autoreconf -fi
sudo ./configure --with-ssl 
sudo make
sudo make install
# update the system’s binaries and symbol lookup
sudo cp /usr/local/bin/curl /usr/bin/curl
curl -V

You may take a look at this post if you have a message like WARNING: curl and libcurl versions do not match. Functionality may be affected.

2. Git

Git is a free and open source distributed version control system.

sudo apt-get update
sudo apt-get install git-all

3. pip

pip is the package installer for Python.

sudo apt-get update
sudo apt-get install python3-pip
pip3 --version

4. ffmpeg

ffmpeg is a cross-platform solution to record, convert and stream audio and video.

sudo apt-get update
sudo apt-get install ffmpeg

5. Audio drivers, extra packages and some cleaning

sudo apt-get update
sudo apt-get install portaudio19-dev libasound2-dev libfontconfig1-dev libmagick++-dev libxml2-dev libharfbuzz-dev libfribidi-dev libgdal-dev
sudo rm -Rf /usr/local/lib/R/site-library/00LOCK-digest

sudo apt-get update
sudo apt-get install cmake cmake-doc ninja-build

6. MuseScore

MuseScore is an open source notation software.

sudo add-apt-repository ppa:mscore-ubuntu/mscore-stable
sudo apt-get update
sudo apt-get install musescore

7. R

R is a free software environment for statistical computing and graphics. To find out your Ubuntu distribution use lsb_release -a at terminal.

sudo sh -c 'echo "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/" >> /etc/apt/sources.list.d/cran.list'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9 
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 51716619E084DAB9
gpg -a --export E084DAB9 | sudo apt-key add -

sudo add-apt-repository ppa:c2d4u.team/c2d4u4.0+

sudo apt-get update && sudo apt-get upgrade
sudo apt-get install r-base
sudo apt-get install r-base-dev

8. RStudio Server

RStudio is an Integrated Development Environment (IDE) for R. Check for updates here.

sudo apt-get update
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/server/bionic/amd64/rstudio-server-2021.09.2-382-amd64.deb
sudo gdebi rstudio-server-2021.09.2-382-amd64.deb

9. R packages

"Packages are the fundamental units of reproducible R code." Hadley Wickham and Jennifer Bryan. The installation may take several minutes. At terminal run:

sudo R

Running R as super user paste the following, row by row:

ini <- Sys.time()
packs <- c('audio','BART','devtools','e1071','ellipse','foreach','ggfortify','RColorBrewer','reticulate','R.utils','seewave','tidyverse','tuneR','VIM','voice','wrassp')
install.packages(packs, dep = T); Sys.time()-ini
update.packages(ask = F); Sys.time()-ini
devtools::install_github('egenn/music'); Sys.time()-ini
devtools::install_github('flujoo/gm'); Sys.time()-ini
url <- 'http://www.rob-mcculloch.org/chm/nonlinvarsel_0.0.1.9001.tar.gz'
download.file(url, destfile = 'temp')
install.packages('temp', repos = NULL, type='source')

To configure the gm package.

usethis::edit_r_environ()

Add the line MUSESCORE_PATH=/usr/bin/mscore to /root/.Renviron file. To exit use :wq at VI. Save and restart the R/RStudio session.

10. Miniconda

Miniconda is a free minimal installer for conda, an open source package, dependency and environment management system for any language—Python, R, Ruby, Lua, Scala, Java, JavaScript, C/ C++, FORTRAN and more, that runs on Windows, macOS and Linux.
Follow the instructions at https://docs.conda.io/en/latest/miniconda.html.

At terminal:

cd ~/Downloads/
wget -r -np -k https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
cd repo.anaconda.com/miniconda/
bash Miniconda3-latest-Linux-x86_64.sh

Do you accept the license terms? [yes|no] yes.

Miniconda3 will now be installed into this location: /home/user/miniconda3 [ENTER]

Do you wish the installer to initialize Miniconda3 by running conda init? yes.
Close and reopen terminal.

conda update -n base -c defaults conda

The following packages will be INSTALLED/REMOVED/UPDATED/DOWNGRADED:... Proceed ([y]/n)? y

conda create -n pyvoice38 python=3.8

The following (NEW) packages will be downloaded/INSTALLED:... Proceed ([y]/n)? y

conda activate pyvoice38
pip3 install -r https://raw.githubusercontent.com/filipezabala/voice/master/requirements.txt

MacOS Installation

The following steps were used to configure github.com/filipezabala/voice on MacOS Ventura. Note the software versions during installation, inconsistency reporting is welcome.
If the error "The package %@ is missing or invalid" appears during the upgrading from MacOS Catalina to Big Sur, press simultaneously command + option + p + r at restart. The processes may be accompanied using the keys command + space 'Activity Monitor'.

Without the following Python items 3 and 11, you may run all the functions except poetry and extract_features_py, that run respectively pyannote-audio and Parselmouth.

Hardware

  • MacBook Air (13-inch, 2017)
  • Processor 1.8 GHz Dual-Core Intel Core i5
  • Memory 8GB 1600 MHz DDR3
  • Graphics Intel HD Graphics 6000 1536 MB

1. Homebrew

Install Homebrew, 'The Missing Package Manager for macOS (or Linux)' and remember to brew doctor eventually. At terminal (command + space 'terminal') run:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
sudo chown -R $(whoami) /usr/local/lib/pkgconfig /usr/local/share/info /usr/local/share/man/man3 /usr/local/share/man/man5
chmod u+w /usr/local/lib/pkgconfig /usr/local/share/info /usr/local/share/man/man3 /usr/local/share/man/man5

2. wget

GNU Wget is a free software package for retrieving files using HTTP, HTTPS, FTP and FTPS, the most widely used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.

brew install wget

3. Python

Python is a programming language that integrate systems. According to this post, it is recommended to install Python 3.8 and 3.9 and make it consistent.

brew install [email protected]
brew install [email protected]
brew unlink [email protected]
brew unlink [email protected]
brew link [email protected]
echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc
python3 --version 
pip3 --version

4. ffmpeg

ffmpeg is a cross-platform solution to record, convert and stream audio and video. The installation may take several minutes.

brew install ffmpeg

5. XQuartz

The XQuartz project is an open-source effort to develop a version of the X.Org X Window System that runs on macOS.

  • Download and run https://github.com/XQuartz/XQuartz/releases/download/XQuartz-2.8.1/XQuartz-2.8.1.dmg
  • Will take 319.2 MB of disk space
  • Send XQuartz-2.8.1.dmg to Trash

6. MacPorts

You may prefer to proceed using the installer, see documentation.

wget https://github.com/macports/macports-base/releases/download/v2.7.2/MacPorts-2.7.2.tar.bz2
tar xjvf MacPorts-2.7.2.tar.bz2
cd MacPorts-2.7.2
cd ../; rm -rf MacPorts-2.7.2*
sudo nano /etc/paths

Add the following lines at the end of the file.

/opt/local/bin
/opt/local/sbin

Use Ctrl+O and return to save the file and Ctrl+X to cloe nano editor. Reboot your terminal.

7. tcllib

sudo port selfupdate && sudo port upgrade tcllib
sudo port install tcllib

7. MuseScore

MuseScore is an open source notation software.

  • Download and run https://musescore.org/en/download/musescore.dmg
  • Drag MuseScore 3 to Applications folder
  • Will take 314 MB of disk space
  • Unmount MuseScore-3.6.2 virtual disk and send MuseScore-3.6.2.548020600.dmg to Trash

8. R

R is a free software environment for statistical computing and graphics.

  • Download and run https://cloud.r-project.org/bin/macosx/base/R-4.2.0.pkg
  • Will take around 180 MB of disk space
  • Send R-4.2.0.pkg to Trash

9. RStudio

RStudio is an Integrated Development Environment (IDE) for R.

  • Download and run https://download1.rstudio.org/desktop/macos/RStudio-2022.02.3-492.dmg
  • Drag RStudio to Applications folder
  • Will take around 770 MB of disk space
  • Unmount RStudio virtual disk and send RStudio-2022.02.3-492.dmg to Trash
  • Type command + space 'rstudio'
  • Tools > Global Options... > Appearance > Merbivore (Restart required)

10. R packages

"Packages are the fundamental units of reproducible R code." Hadley Wickham and Jennifer Bryan. Type command + space 'terminal'

sudo R

Running R as super user paste the following, row by row:

ini <- Sys.time()
packs <- c('audio','BART','devtools','e1071','ellipse','foreach','ggfortify','RColorBrewer','reticulate','R.utils','seewave','tidyverse','tuneR','VIM','voice','wrassp')
install.packages(packs, dep = T); Sys.time()-ini
update.packages(ask = F); Sys.time()-ini
devtools::install_github('egenn/music'); Sys.time()-ini
devtools::install_github('flujoo/gm'); Sys.time()-ini
url <- 'http://www.rob-mcculloch.org/chm/nonlinvarsel_0.0.1.9001.tar.gz'
download.file(url, destfile = 'temp')
install.packages('temp', repos = NULL, type='source')

11. Miniconda

Miniconda is a free minimal installer for conda, an open source package, dependency and environment management system for any language—Python, R, Ruby, Lua, Scala, Java, JavaScript, C/ C++, FORTRAN and more, that runs on Windows, macOS and Linux.

cd ~/Downloads
wget -r -np -k https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
cd repo.anaconda.com/miniconda/
bash Miniconda3-latest-MacOSX-x86_64.sh

Do you accept the license terms? [yes|no] yes.

Miniconda3 will now be installed into this location: /Users/[your_user]/miniconda3 [ENTER]

Do you wish the installer to initialize Miniconda3 by running conda init? yes.

Close and reopen terminal.

export PATH="~/miniconda3/bin:$PATH"
conda update -n base -c defaults conda

The following packages will be INSTALLED/REMOVED/UPDATED/DOWNGRADED:... Proceed ([y]/n)? y

conda create -n pyvoice38 python=3.8

The following (NEW) packages will be downloaded/INSTALLED:... Proceed ([y]/n)? y

Close and reopen terminal.

conda activate pyvoice38
pip3 install -r https://raw.githubusercontent.com/filipezabala/voice/master/requirements.txt

voice.

Metadata

Version

0.4.21

License

Unknown

Platforms (75)

    Darwin
    FreeBSD 13
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd13
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd13
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows