org.ow2.weblab.service.transcript.sphinx
Class WebLabTextTranscriptCreator
java.lang.Object
org.ow2.weblab.service.transcript.sphinx.WebLabTextTranscriptCreator
public class WebLabTextTranscriptCreator
- extends java.lang.Object
|
Constructor Summary |
WebLabTextTranscriptCreator(SphinxTranscriptor sphinxTranscriptor,
org.ow2.weblab.content.api.ContentManager contentManager,
boolean writeTokenInfo,
boolean writeFiller,
boolean writeScore,
boolean writePronunciation,
java.lang.String targetLang)
Generates all text transcript from all audio media unit contained in a
WebLab document using a specific sphinxTranscriptor |
|
Method Summary |
protected void |
addWord(java.lang.StringBuffer sb,
org.ow2.weblab.core.model.Annotation textAnnotation,
org.ow2.weblab.core.model.Annotation audioAnnotation,
org.ow2.weblab.core.model.Text text,
org.ow2.weblab.core.model.Audio audio,
edu.cmu.sphinx.decoder.search.Token token,
edu.cmu.sphinx.frontend.FloatData startFeature,
edu.cmu.sphinx.frontend.FloatData endFeature)
Generates the two segments with all configured annotations |
protected void |
generatedTranscriptedText(edu.cmu.sphinx.decoder.search.Token curToken,
org.ow2.weblab.core.model.Text text,
org.ow2.weblab.core.model.Audio audio,
org.ow2.weblab.core.model.Annotation textAnnotation,
org.ow2.weblab.core.model.Annotation audioAnnotation)
Creates aligned segments from Token, Text and Audio. |
java.lang.String |
toString()
|
void |
transcriptDocument(org.ow2.weblab.core.model.Document parent)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
sphinxTranscriptor
protected SphinxTranscriptor sphinxTranscriptor
writeTokenInfo
protected boolean writeTokenInfo
writeFiller
protected boolean writeFiller
writeScore
protected boolean writeScore
writePronunciation
protected boolean writePronunciation
targetLang
protected java.lang.String targetLang
contentManager
protected org.ow2.weblab.content.api.ContentManager contentManager
WebLabTextTranscriptCreator
public WebLabTextTranscriptCreator(SphinxTranscriptor sphinxTranscriptor,
org.ow2.weblab.content.api.ContentManager contentManager,
boolean writeTokenInfo,
boolean writeFiller,
boolean writeScore,
boolean writePronunciation,
java.lang.String targetLang)
- Generates all text transcript from all audio media unit contained in a
WebLab document using a specific sphinxTranscriptor
- Parameters:
sphinxTranscriptor - model used to transcriptcontentManager - content manager to be usedwriteTokenInfo - true if your want to add extra information on each tokenwriteFiller - true if you want filler wordswriteScore - true if you want to write scorewritePronunciation - true if you want to write pronunciationtargetLang - target language
transcriptDocument
public void transcriptDocument(org.ow2.weblab.core.model.Document parent)
throws org.ow2.weblab.core.services.InvalidParameterException,
org.ow2.weblab.core.services.ContentNotAvailableException
- Throws:
org.ow2.weblab.core.services.InvalidParameterException
org.ow2.weblab.core.services.ContentNotAvailableException
generatedTranscriptedText
protected void generatedTranscriptedText(edu.cmu.sphinx.decoder.search.Token curToken,
org.ow2.weblab.core.model.Text text,
org.ow2.weblab.core.model.Audio audio,
org.ow2.weblab.core.model.Annotation textAnnotation,
org.ow2.weblab.core.model.Annotation audioAnnotation)
- Creates aligned segments from Token, Text and Audio. inspired from Sphinx
code in Result.getTimedWordPath
- Parameters:
token - Sphinx Tokentext - Text media unit transcriptedaudio - Audio source media unitaudioAnnotation - Annotation on Audio unittextAnnotation - Annotation on Text unit
addWord
protected void addWord(java.lang.StringBuffer sb,
org.ow2.weblab.core.model.Annotation textAnnotation,
org.ow2.weblab.core.model.Annotation audioAnnotation,
org.ow2.weblab.core.model.Text text,
org.ow2.weblab.core.model.Audio audio,
edu.cmu.sphinx.decoder.search.Token token,
edu.cmu.sphinx.frontend.FloatData startFeature,
edu.cmu.sphinx.frontend.FloatData endFeature)
- Generates the two segments with all configured annotations
- Parameters:
textAnnotation - Annotation where to add text segment metadataaudioAnnotation - Annotation where to add audio segment metadatatext - Text unit to add linear segment toaudio - Audio unit to add temporal segment totoken - the Sphinx recognnized tokenstartFeature - Sphinx started featureendFeature - Sphinx ending feature
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
Copyright © 2004-2011. All Rights Reserved.