Class VoskEngine
java.lang.Object
org.opencastproject.speechtotext.impl.engine.VoskEngine
- All Implemented Interfaces:
SpeechToTextEngine
Vosk implementation of the Speech-to-text engine interface.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.opencastproject.speechtotext.api.SpeechToTextEngine
SpeechToTextEngine.Result -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
VOSK_EXECUTABLE_DEFAULT_PATH
Default path to vosk.- See Also:
-
VOSK_DEFAULT_LANGUAGE
Default Language- See Also:
-
-
Constructor Details
-
VoskEngine
public VoskEngine()
-
-
Method Details
-
getEngineName
Description copied from interface:SpeechToTextEngineReturns the name of the implemented engine.- Specified by:
getEngineNamein interfaceSpeechToTextEngine- Returns:
- The name of the implemented engine.
-
activate
public void activate(org.osgi.service.component.ComponentContext cc) -
generateSubtitlesFile
public SpeechToTextEngine.Result generateSubtitlesFile(File mediaFile, File workingDirectory, String language, Boolean translate) throws SpeechToTextEngineException Generates the subtitles file.- Specified by:
generateSubtitlesFilein interfaceSpeechToTextEngine- Parameters:
mediaFile- The media package containing the audio track.workingDirectory- A unique working directory to safely operate in.language- The language of the audio track.translate- If the subtitles should be translated into english- Returns:
- Result containing the language code and the subtitles file path.
- Throws:
SpeechToTextEngineException- Thrown when an error occurs at the process.- See Also:
-