Class WhisperEngine
java.lang.Object
org.opencastproject.speechtotext.impl.engine.WhisperEngine
- All Implemented Interfaces:
SpeechToTextEngine
Whisper 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
-
WHISPER_EXECUTABLE_DEFAULT_PATH
Default path to Whisper.- See Also:
-
WHISPER_MODEL_DEFAULT
Default whisper model- See Also:
-
-
Constructor Details
-
WhisperEngine
public WhisperEngine()
-
-
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:
-