-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking Speech API development. #2522
Comments
@dhermes I commented on your gist from today but I'll copy it here as well... Thank you for this! I have another question. In the sample the way that you unpack the response is via response = cloud_speech_pb2.AsyncRecognizeResponse()
operation.response.Unpack(response) But that has to be done after the Operation is completed. The point of async is not to block right? If our lib has to wait until the operation is complete before the data can be unpacked then it would block right? One thought I had was to add a helper of some kind that unpacks the data for us. import time
from google.cloud import speech
from google.cloud.speech.encoding import Encoding
client = speech.Client()
sample = client.sample(source_uri='gs://ferrous-arena-my-test-bucket/sample.raw', encoding=Encoding.LINEAR16, sample_rate=16000)
operation = client.async_recognize(sample, max_alternatives=2)
retry_count = 10
while retry_count > 0 and not operation.complete:
retry_count -= 1
time.sleep(1)
operation.poll() # API call
for result in speech.unpack_async(operation): # The helper `unpack_async`.
print('Result:')
for alternative in result.alternatives:
print(u' ({}): {}'.format(
alternative.confidence, alternative.transcript)) But otherwise I'm not sure how to get the data without blocking unless we do some kind of weird pubsub design. |
Scratch that...we could just parse it in |
@daspecster It's not up to use to get the data, just give the user the |
Is this available yet? I've installed |
@fehrenbacher yes, that documentation is confusing. hopefully a message is added soon to explain: #2620 |
@fehrenbacher it's not released yet, however if you install from source you can play with the API. As you can see in the first link, it's at the "Planning" stage. That package is a place holder. The documentation message hasn't gone up because there hasn't been a release yet. We're working on a better release strategy as well. |
K thanks for clearing that up! |
@fehrenbacher it's my mistake with having the docs out there. I think I have a better process for next time. If you decide to install from source and play with it, please let me know if you run into any issues! I have a handful of things I'm working to resolve this week and then I'm hoping we will be able to release it. |
@daspecster nice :-) looking forward to it! |
Closing this since everything is complete and I opened #2842 to track the last few little changes. |
These are the items required to reach feature completion.
sync_recognize
system tests (Add Speech sync recognize system test. #2547)async_recognize
system tests (Add speech async JSON/REST system tests. #2648)Cleanup
SpeechContext
in tests. See: Update speech async_recognize tests #2700. (Fix bug with speech streaming speech_context. #2717)Transcript
toAlternative
. (Rename Transcript to Alternative. #2666)Sample
. #2516google-cloud-speech
not yet released. See: Add message about API not being available yet. #2620 (Remove speech package not yet released warning. #2732)Future Updates:
Sample.content
(Decide how to handle stream vs bytes content in Speech streaming_recognize(). #2708)The text was updated successfully, but these errors were encountered: