public class SpokestackCloudClient extends Object
This client encapsulates the websocket logic used to communicate with Spokestack's cloud-based ASR service.
Modifier and Type | Class and Description |
---|---|
static class |
SpokestackCloudClient.Builder
Spokestack speech client builder.
|
static interface |
SpokestackCloudClient.Listener
speech client listener callback interface.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
releases the resources associated with the speech client.
|
void |
connect()
establishes a websocket connection for speech recognition.
|
void |
disconnect()
disconnects the websocket.
|
void |
endAudio()
sends any buffered data followed by an empty message indicating the end
of the utterance.
|
void |
init()
sends an initial empty request message to authenticate with the server.
|
boolean |
isConnected() |
void |
sendAudio(ByteBuffer frame)
transmits an audio frame over the websocket.
|
public void close()
public boolean isConnected()
public void connect()
public void init()
public void disconnect()
public void sendAudio(ByteBuffer frame)
frame
- the audio frame buffer to sendpublic void endAudio()
Copyright © 2020. All rights reserved.