Git Product home page Git Product logo

runngezhang / wrassp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ips-lmu/wrassp

0.0 0.0 0.0 3.49 MB

wrassp is a wrapper for R around Michel Scheffers's libassp (Advanced Speech Signal Processor). The libassp library aims at providing functionality for handling speech signal files in most common audio formats and for performing analyses common in phonetic science/speech science. This includes the calculation of formants, fundamental frequency, root mean square, auto correlation, a variety of spectral analyses, zero crossing rate, filtering etc. This wrapper provides R with a large subset of libassp's signal processing functions and provides them to the user in a (hopefully) user-friendly manner. The wrassp package is used by the EMU Speech Database Management System (EMU-SDMS) to perform signal processing routines.

Home Page: http://ips-lmu.github.io/EMU.html

R 9.97% C 90.03%

wrassp's Introduction

wrassp

Build Status Coverage Status CRAN_Status_Badge

wrassp is a wrapper for R around Michel Scheffers's libassp (Advanced Speech Signal Processor). The libassp library aims at providing functionality for handling speech signal files in most common audio formats and for performing analyses common in phonetic science/speech science. This includes the calculation of formants, fundamental frequency, root mean square, auto correlation, a variety of spectral analyses, zero crossing rate, filtering etc. This wrapper provides R with a large subset of libassp's signal processing functions and provides them to the user in a (hopefully) user-friendly manner.

This package is part of the next iteration of the EMU Speech Database Management System which aims to be as close to an all-in-one solution for generating, manipulating, querying, analyzing and managing speech databases as possible. For an overview of the system please visit this URL: http://ips-lmu.github.io/EMU.html.

Installation

install.packages("wrassp")
  • or install the latest development version from GitHub (as large parts of wrassp are written in C make sure your system fulfills the requirements for package development (see here)):
library(devtools)
install_github("IPS-LMU/wrassp", build_vignettes = TRUE)

Quick start

  • load the library:
library("wrassp")
  • get path to an audio file:
path2wav <- list.files(system.file("extdata", package = "wrassp"), pattern = glob2rx("*.wav"), full.names = TRUE)[1]
  • calculate formants from audio file:
res=forest(path2wav, toFile=FALSE)
  • plot the first 100 F1 values over time:
plot(res$fm[1:100,1],type='l')
  • for more information see the An introduction to the wraspp package vignette:
vignette('wrassp_intro')

Available signal processing functions

  • acfana(): Analysis of short-term autocorrelation function
  • afdiff(): Computes the first difference of the signal
  • affilter(): Filters the audio signal (see docs for types)
  • cepstrum(): Short-term cepstral analysis
  • cssSpectrum(): Cepstral smoothed version of dftSpectrum()
  • dftSpectrum(): Short-term DFT spectral analysis
  • forest(): Formant estimation
  • ksvF0(): F0 analysis of the signal
  • lpsSpectrum(): Linear Predictive smoothed version of dftSpectrum()
  • mhsF0(): Pitch analysis of the speech signal using Michel's/Modified Harmonic Sieve algorithm
  • rfcana(): Linear Prediction analysis
  • rmsana(): Analysis of short-term Root Mean Square amplitude
  • zcrana(): Analysis of the averages of the short-term positive and negative zero-crossing rates

(see the respective R documentation for more details on all of these functions)

Available file handling functions

  • read.AsspDataObj(): read an existing SSFF file into a AsspDataObj which is its in-memory equivalent.
  • write.AsspDataObj(): write a AsspDataObj out to a SSFF file.

For Developers

Checking on rocker/r-devel docker image (prerequisite docker is installed)

  • pull current r-devel image: docker pull rocker/r-devel
  • check if pull worked: docker images
  • check R version in image: docker run rocker/r-devel:latest R --version
  • run interactive version of bash and mount wrassp project folder (==current directory): docker run --rm -ti -v $(pwd):/wrassp rocker/r-devel:latest bash
  • build: RD CMD build --resave-data --no-manual --no-build-vignettes wrassp
  • manually install deps (this might need a bit of tweaking): RD -e 'install.packages(c("stringi","evaluate","compare", "rmarkdown", "knitr", "testthat"))'
  • check: RD CMD check --as-cran wrassp_*.tar.gz

Using rchk for additional checks

  • clone repo git clone https://github.com/joshuaulrich/rchk-docker.git
  • cd rchk-docker
  • build docker image docker build .
  • code below is adapted from final example of this README.md: https://github.com/kalibera/rchk
  • build r package ./bin/R CMD build --resave-data --no-manual --no-build-vignettes /wrassp
  • install package echo 'install.packages("wrassp_0.1.5.tar.gz",repos=NULL)' | ./bin/R --slave
  • run rchk /opt/rchk/scripts/check_package.sh wrassp
  • view rchk results less packages/lib/wrassp/libs/wrassp.so.bcheck and less packages/lib/wrassp/libs/wrassp.so.maacheck

Authors

Raphael Winkelmann

Lasse Bombien

Affiliations

INSTITUTE OF PHONETICS AND SPEECH PROCESSING

wrassp's People

Contributors

matthew-intersect avatar quabolasse avatar raphywink avatar stevecassidy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.