From b92d6f9e3516e038fb552874636b4863c809f6d0 Mon Sep 17 00:00:00 2001 From: paweldomas Date: Thu, 9 Jan 2020 16:14:27 -0600 Subject: [PATCH] ref(GoogleCloudStreamingSession): share requestManager instance ...with parent. --- .../GoogleCloudStreamingRecognitionSession.java | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/main/java/org/jitsi/jigasi/transcription/GoogleCloudStreamingRecognitionSession.java b/src/main/java/org/jitsi/jigasi/transcription/GoogleCloudStreamingRecognitionSession.java index 6a7f2ad70..970bcea29 100644 --- a/src/main/java/org/jitsi/jigasi/transcription/GoogleCloudStreamingRecognitionSession.java +++ b/src/main/java/org/jitsi/jigasi/transcription/GoogleCloudStreamingRecognitionSession.java @@ -273,9 +273,7 @@ private ApiStreamObserver createObserver( // to get an unique ID ResponseApiStreamingObserver responseObserver = - new ResponseApiStreamingObserver<>( - this, - config.getLanguageCode()); + new ResponseApiStreamingObserver<>(config.getLanguageCode()); // StreamingRecognitionConfig which will hold information // about the streaming session, including the RecognitionConfig @@ -506,13 +504,6 @@ private class ResponseApiStreamingObserver implements ApiStreamObserver { - /** - * The manager which is used to send new audio requests. Should be - * notified when a final result comes in to be able to start a new - * session - */ - private RequestApiStreamObserverManager requestManager; - /** * The language of the speech being provided in the current session */ @@ -528,12 +519,10 @@ private class ResponseApiStreamingObserver * Create a ResponseApiStreamingObserver which listens for transcription * results * - * @param manager the manager of requests + * @param languageTag */ - ResponseApiStreamingObserver(RequestApiStreamObserverManager manager, - String languageTag) + ResponseApiStreamingObserver(String languageTag) { - this.requestManager = manager; this.languageTag = languageTag; messageID = UUID.randomUUID();