Interface GPTDictationService
-
- All Known Implementing Classes:
GPTDictationServiceImpl
public interface GPTDictationService
Services related to dictation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isAvailable(GPTConfiguration configuration)
Whether the service is enabled and properly configured.String
transcribe(InputStream audioStream, String contentType, String language, GPTConfiguration configuration, String prompt)
Transcribes the input audio to text.
-
-
-
Method Detail
-
isAvailable
boolean isAvailable(@Nullable GPTConfiguration configuration)
Whether the service is enabled and properly configured.
-
transcribe
String transcribe(@Nonnull InputStream audioStream, @Nonnull String contentType, @Nullable String language, @Nullable GPTConfiguration configuration, @Nullable String prompt) throws IllegalStateException
Transcribes the input audio to text.- Parameters:
audioStream
- the audio stream to transcribe, will be closedcontentType
- the content type of the audio, e.g. "audio/mpeg" for mp3, "audio/wav" for wavlanguage
- the language code to use, e.g. "en" for English, or null for automatic detectionconfiguration
- the configuration to use, or null for the default configurationprompt
- an optional prompt to give the AI some context, e.g. previous sentences- Throws:
IllegalStateException
- if the service is not available / configured
-
-