Skip to content

Commit

Permalink
Python GAPIC: Speech v1 (#3678)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukesneeringer authored Jul 28, 2017
1 parent e281044 commit 79f1a61
Show file tree
Hide file tree
Showing 4 changed files with 153 additions and 46 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ class RecognitionConfig(object):
class AudioEncoding(object):
"""
Audio encoding of the data sent in the audio message. All encodings support
only 1 channel (mono) audio. Only ``FLAC`` includes a header that describes
the bytes of audio that follow the header. The other encodings are raw
audio bytes with no header.
only 1 channel (mono) audio. Only ``FLAC`` and ``WAV`` include a header that
describes the bytes of audio that follow the header. The other encodings
are raw audio bytes with no header.
For best results, the audio source should be captured and transmitted using
a lossless encoding (``FLAC`` or ``LINEAR16``). Recognition accuracy may be
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@ def recognize(self, config, audio, options=None):
:exc:`google.gax.errors.GaxError` if the RPC is aborted.
:exc:`ValueError` if the parameters are invalid.
"""
# Create the request object.
request = cloud_speech_pb2.RecognizeRequest(config=config, audio=audio)
return self._recognize(request, options)

Expand Down Expand Up @@ -244,7 +243,6 @@ def long_running_recognize(self, config, audio, options=None):
:exc:`google.gax.errors.GaxError` if the RPC is aborted.
:exc:`ValueError` if the parameters are invalid.
"""
# Create the request object.
request = cloud_speech_pb2.LongRunningRecognizeRequest(
config=config, audio=audio)
return google.gax._OperationFuture(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@
"DEADLINE_EXCEEDED",
"UNAVAILABLE"
],
"non_idempotent": [
"UNAVAILABLE"
]
"non_idempotent": []
},
"retry_params": {
"default": {
Expand Down
Loading

0 comments on commit 79f1a61

Please sign in to comment.