From 80e82ce7d5f2e4da2c5df3e912bec00d4f05be13 Mon Sep 17 00:00:00 2001 From: Jerjou Cheng Date: Mon, 20 Jun 2016 15:40:52 -0700 Subject: [PATCH] Add region tags --- speech/api/speech_streaming.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/speech/api/speech_streaming.py b/speech/api/speech_streaming.py index ac661540ec2..6ecac2e2804 100644 --- a/speech/api/speech_streaming.py +++ b/speech/api/speech_streaming.py @@ -56,6 +56,7 @@ def make_channel(host, port): return implementations.secure_channel(host, port, composite_channel) +# [START audio_stream] @contextlib.contextmanager def record_audio(channels, rate, chunk): """Opens a recording stream in a context manager.""" @@ -70,6 +71,7 @@ def record_audio(channels, rate, chunk): audio_stream.stop_stream() audio_stream.close() audio_interface.terminate() +# [END audio_stream] def request_stream(stop_audio, channels=CHANNELS, rate=RATE, chunk=CHUNK):