The server Module
Handles communication with the speech recognition server.
Server methods allow you to create, access and manage server streams as well
as get information about the server and view or modify server parameters.
For example, to decode a file:
stream = Stream("foo.wav")
server = Server("my host")
server.decodestreams(stream)
-
class client.server.Server(host)
Create a Server object for host.
-
decodestreams(streams)
- Start speech recognition decoding of given client.stream.Stream object(s).
-
getstreams(*metadatas)
- Return a list of decoding streams currently on the server.
If a metadata dictionary is passed, return only matching streams.
If given multiple metadatas, return the union of their respective
matches.
-
joinstartstreams(streams)
- Wait until all given streams have begun decoding on the server. Stream
state is refreshed.
-
refreshstreams(streams)
- Refresh the given streams’ internal state with the current server state.
-
pausestreams(streams)
- Pause decoding of given streams.
-
resumestreams(streams, fromtime=None)
- Resume decoding of given streams. If fromtime is a datetime, skip all
utterances (up to current) that end before fromtime. If fromtime
is -1, skip to current. Else (default) resume all streams from time of pause.
-
closestreams(streams)
- Close (abort) decoding of given streams.
-
deletestreams(streams)
- Close given streams and remove all related artifacts from server.
-
getparams(*params)
- Return dictionary with server’s values for given params. If no params
are given, then return all server parameters and values.
-
setparams(**params)
- Set server’s values per the given parameter:value mappings.
-
status()
- Return status of server: number of streams active/queued, system decoding
stats, etc.
-
sysinfo()
- Return system info (machine info, version, uptime, ...).