Coder Social home page Coder Social logo

forced-decoding's Introduction

forced-decoding

This repository contains
A) the files needed to perform forced decoding given a piece of audio and the "ground truth" to be obtained from the decoding.
B) the files needed to turn this into an API.

Disclaimer: All of the API work here is very primitive and should only be used as a proof of concept.

Requirements

I tested everything here with an Ubuntu 20.04 VM on Azure for the backend / decoding part.

Setup

Backend / Forced Decoding

To set up the backend / decoding, follow these steps on the Ubuntu machine (as root):

  1. Install Docker.
  2. docker pull kaldiasr/kaldi
  3. Clone this repository.
  4. docker run -it -v <PATH_TO_REPO>/server:/opt/kaldi/egs/wsj/s5/forced_vit kaldiasr/kaldi /bin/bash
  5. In the container, run:
cd egs/wsj/s5/
cp -r forced_vit/* .
./stage.sh
./make_forced.sh
./setup_speech.sh
  1. Detach from the container (make sure it stays running)
  2. Run the server script app.py
    Usage: python3 app.py <docker-container-id>

Client Side

No set up needed for client side, just run client script detect_ans.py with the IP of the server.
Usage: python3 detect_ans.py <api-ip>

Testing

If you just want to test to make sure forced decoding works after setting up the backend, inside the docker container you can place the audio file here: /opt/kaldi/egs/wsj/s5/client_sound.wav

Then run: ./forced_single.sh "<WORDS-TO-DECODE>"

Running this for the first time will take a while.

Also, client/split_test_data.py is included to show how I roughly split audio given the youtube transcript when testing the decoder for resilience.

forced-decoding's People

Contributors

branai avatar

Watchers

 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.