From 44fae3fc8d0079472d3843f787ccf2cdd544adf5 Mon Sep 17 00:00:00 2001 From: Jerjou Cheng Date: Wed, 21 Dec 2016 15:06:15 -0800 Subject: [PATCH] Update exception --- speech/grpc/transcribe_streaming.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/speech/grpc/transcribe_streaming.py b/speech/grpc/transcribe_streaming.py index bb8bd4dced7..b02b1767e9d 100644 --- a/speech/grpc/transcribe_streaming.py +++ b/speech/grpc/transcribe_streaming.py @@ -28,7 +28,7 @@ import google.auth.transport.requests from google.cloud.grpc.speech.v1beta1 import cloud_speech_pb2 from google.rpc import code_pb2 -from grpc.framework.interfaces.face import face +import grpc import pyaudio from six.moves import queue @@ -225,7 +225,7 @@ def main(): listen_print_loop(recognize_stream) recognize_stream.cancel() - except face.CancellationError: + except grpc.RpcError: # This happens because of the interrupt handler pass