Skip to content

Commit 4e68acc

Browse files
jerjouJon Wayne Parrott
authored andcommitted
Update exception (#737)
1 parent b7d2b50 commit 4e68acc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

speech/grpc/transcribe_streaming.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import google.auth.transport.requests
2929
from google.cloud.grpc.speech.v1beta1 import cloud_speech_pb2
3030
from google.rpc import code_pb2
31-
from grpc.framework.interfaces.face import face
31+
import grpc
3232
import pyaudio
3333
from six.moves import queue
3434

@@ -225,7 +225,7 @@ def main():
225225
listen_print_loop(recognize_stream)
226226

227227
recognize_stream.cancel()
228-
except face.CancellationError:
228+
except grpc.RpcError:
229229
# This happens because of the interrupt handler
230230
pass
231231

0 commit comments

Comments
 (0)