How to get the result of a long-running Google Cloud Speech API operation later?
问题 Below is a snippet that calls the Google Cloud Speech API long running operation to convert an audio file to text from google.cloud import speech speech_client = speech.Client() audio_sample = speech_client.sample( content=None, source_uri=gcs_uri, encoding='FLAC', sample_rate_hertz=44100) operation = audio_sample.long_running_recognize('en-US') retry_count = 100 while retry_count > 0 and not operation.complete: retry_count -= 1 time.sleep(60) operation.poll() However, as it is a long running