Interface SpeechToTextEngine
- All Known Implementing Classes:
VoskEngine,WhisperCppEngine,WhisperEngine
public interface SpeechToTextEngine
Interface for speech-to-text implementations.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptiongenerateSubtitlesFile(File mediaFile, File workingDirectory, String language, Boolean translate) Generates the subtitles file.Returns the name of the implemented engine.
-
Method Details
-
getEngineName
String getEngineName()Returns the name of the implemented engine.- Returns:
- The name of the implemented engine.
-
generateSubtitlesFile
SpeechToTextEngine.Result generateSubtitlesFile(File mediaFile, File workingDirectory, String language, Boolean translate) throws SpeechToTextEngineException Generates the subtitles file.- 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.
-