Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

WebAligner

A simple lightweight client-side forced aligner for speech.

Algorithm

  1. Estimate the word boundaries (optionally using the length of each word)
  2. Calculate the RMS energy plot of the audio
  3. For each estimated word boundary, use gradient descent to find the local minimum of the RMS energy plot

Usage

An example interface can be found here.

bower install webaligner
<script src="bower_components/webaligner/webaligner.js"></script>
<script>
  var audioCtx = new (window.AudioContext || window.webkitAudioContext)();
  var audioData = new ArrayBuffer(2000);
  var startTime = 2.3;
  var endTime = 5.6;
  var words = "the quick brown fox jumps over the lazy dog";
  var weightByWordLength = true;
  var useTimes = function(times) {
    // do something with the timestamps
  }
  webAligner.align(audioCtx, audioData, startTime, endTime,
                     words, weightByWordLength, useTimes);
</script>

About

A client-side forced aligner for speech

Resources

Stars

8 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages