public abstract class Transcriber
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected SpeechServiceConfig |
config |
| Modifier and Type | Method and Description |
|---|---|
static Transcriber |
create(java.lang.String audioPath,
SpeechServiceConfig config) |
protected abstract void |
sendAudio(java.io.InputStream audioStream,
MessageSender sender) |
void |
transcribe(java.io.InputStream audioStream,
java.util.function.Consumer<java.lang.String> onResult,
java.util.function.Consumer<java.lang.String> onHypothesis) |
protected final SpeechServiceConfig config
public void transcribe(java.io.InputStream audioStream,
java.util.function.Consumer<java.lang.String> onResult,
java.util.function.Consumer<java.lang.String> onHypothesis)
throws java.lang.Exception
java.lang.Exceptionprotected abstract void sendAudio(java.io.InputStream audioStream,
MessageSender sender)
throws java.io.IOException
java.io.IOExceptionpublic static Transcriber create(java.lang.String audioPath, SpeechServiceConfig config)