Skip to content

Commit

Permalink
ref(GoogleCloudStreamingSession): share requestManager instance
Browse files Browse the repository at this point in the history
...with parent.
  • Loading branch information
paweldomas committed Jan 9, 2020
1 parent a1175a2 commit b92d6f9
Showing 1 changed file with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,7 @@ private ApiStreamObserver<StreamingRecognizeRequest> createObserver(
// to get an unique ID
ResponseApiStreamingObserver<StreamingRecognizeResponse>
responseObserver =
new ResponseApiStreamingObserver<>(
this,
config.getLanguageCode());
new ResponseApiStreamingObserver<>(config.getLanguageCode());

// StreamingRecognitionConfig which will hold information
// about the streaming session, including the RecognitionConfig
Expand Down Expand Up @@ -506,13 +504,6 @@ private class ResponseApiStreamingObserver
<T extends StreamingRecognizeResponse>
implements ApiStreamObserver<T>
{
/**
* 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
*/
Expand All @@ -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();
Expand Down

0 comments on commit b92d6f9

Please sign in to comment.