public class SpeechAligner
extends java.lang.Object
Constructor and Description |
---|
SpeechAligner(java.lang.String amPath,
java.lang.String dictPath,
java.lang.String g2pPath) |
Modifier and Type | Method and Description |
---|---|
java.util.List<WordResult> |
align(java.net.URL audioUrl,
java.util.List<java.lang.String> sentenceTranscript)
Align audio to sentence transcript
|
java.util.List<WordResult> |
align(java.net.URL audioUrl,
java.lang.String transcript) |
void |
dumpAlignment(java.util.List<java.lang.String> transcript,
int[] alignment,
java.util.List<WordResult> results) |
TextTokenizer |
getTokenizer() |
java.util.List<java.lang.String> |
sentenceToWords(java.util.List<java.lang.String> sentenceTranscript) |
void |
setTokenizer(TextTokenizer wordExpander) |
public SpeechAligner(java.lang.String amPath, java.lang.String dictPath, java.lang.String g2pPath) throws java.net.MalformedURLException, java.io.IOException
java.net.MalformedURLException
java.io.IOException
public java.util.List<WordResult> align(java.net.URL audioUrl, java.lang.String transcript) throws java.io.IOException
java.io.IOException
public java.util.List<WordResult> align(java.net.URL audioUrl, java.util.List<java.lang.String> sentenceTranscript) throws java.io.IOException
audioUrl
- audio file URL to processsentenceTranscript
- cleaned transcriptjava.io.IOException
- if IO went wrongpublic java.util.List<java.lang.String> sentenceToWords(java.util.List<java.lang.String> sentenceTranscript)
public void dumpAlignment(java.util.List<java.lang.String> transcript, int[] alignment, java.util.List<WordResult> results)
public TextTokenizer getTokenizer()
public void setTokenizer(TextTokenizer wordExpander)