Coder Social home page Coder Social logo

w2v2-vad's Introduction

w2v2-vad

A wrapper for Audeering's wav2vector-based dimensional speech emotion recognition (arousal, dominance, and valence).

Input-output

input: any audio file readable by torchaudio at any sample rate (will be resampled to 16000 Hz on the fly)
output: score of valence, arousal, and dominance in a range [0, 1]

Virtual Environment

I recommend using a virtual environment to run this script. You can use either venv or conda. I prefer to use (Mini) conda now over venv. Here is the example.

conda create -n w2v2-vad python=3.8
conda activate w2v2-vad

Installation

pip3 install -r requirements.txt

Usage

python3 predict_vad_w2v2.py input.wav

Arguments

Positional: input file at any sample rate
Optional:  
-s split, `chunks` or `full`, default is full.  
-d duration, duration in seconds (if the split is chunks, must be specified)  

Example

bagus@L140MU:w2v2-vad$ python3 predict_vad_w2v2.py bagus-test_16000.wav 
Arousal, dominance, and valence #0: [[0.32293236 0.41639617 0.5942142 ]]
bagus@L140MU:w2v2-vad$ python3 predict_vad_w2v2.py bagus-test_16000.wav -s chunks -d 2
Arousal, dominance, and valence #0: [[0.3404813  0.42247295 0.35256445]]
Arousal, dominance, and valence #1: [[0.22009875 0.322832   0.51018834]]
Arousal, dominance, and valence #2: [[0.3478799  0.4332775  0.45645887]]
Arousal, dominance, and valence #3: [[0.29967275 0.4038131  0.4949872 ]]
Arousal, dominance, and valence #4: [[0.24804251 0.33543587 0.50990975]]
Arousal, dominance, and valence #5: [[0.38564402 0.43214017 0.37035757]]

Demo (v1.0)

asciicast

Original repo

https://github.com/audeering/w2v2-how-to

All credit goes to Audeering.

w2v2-vad's People

Contributors

bagustris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

w2v2-vad's Issues

Error on CPU

When running the inference code, e.g., plot_va_chunk.py, I got the following error:

OSError: libc10_cuda.so: cannot open shared object file: No such file or directory

Trying everything but no luck, no problem in other machines.

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.