Source:
<code>Exception onConferenceCallStarted(Call jvbConferenceCall) { this.jvbCall = jvbConferenceCall; this.chatRoom = super.jvbConference.getJvbRoom(); if(!service.isConfiguredProperly()) { logger.warn("TranscriptionService is not properly configured"); sendMessageToRoom("Transcriber is not properly " + "configured. Contact the service administrators and let them " + "know! I will now leave."); jvbConference.stop(); return null; } jvbConferenceCall.setConference(new MediaAwareCallConference() { @Override public MediaDevice getDefaultDevice(MediaType mediaType, MediaUseCase useCase) { if(MediaType.AUDIO.equals(mediaType)) { return transcriber.getMediaDevice(); } return super.getDefaultDevice(mediaType, useCase); } }); for (TranscriptionResultPublisher pub : handler.getTranscriptResultPublishers()) { if (pub instanceof TranscriptionEventListener) transcriber.addTranscriptionEventListener( (TranscriptionEventListener)pub); } transcriber.addTranscriptionEventListener(this); transcriber.start(); addInitialMembers(); StringBuilder welcomeMessage = new StringBuilder("Started transcription!\n"); finalTranscriptPromises.addAll(handler.getTranscriptPublishPromises()); for(TranscriptPublisher.Promise promise : finalTranscriptPromises) { if(promise.hasDescription()) { welcomeMessage.append(promise.getDescription()); } <START> if(promise.wantsAudioRecording()) <END> { promise.giveAudioMixerMediaDevice(transcriber.getMediaDevice()); } } sendMessageToRoom(welcomeMessage.toString()); logger.debug("TranscriptionGatewaySession started transcribing"); return null; }</code><technical_language>wantsAudioRecording superfluous -- remove call giveAudioMixerMediaDevice (which I suggest renaming setMediaDevice) functional change. prefer this way, is simpler</technical_language>

Target:
Exception onConferenceCallStarted(Call jvbConferenceCall) { this.jvbCall = jvbConferenceCall; this.chatRoom = super.jvbConference.getJvbRoom(); if(!service.isConfiguredProperly()) { logger.warn("TranscriptionService is not properly configured"); sendMessageToRoom("Transcriber is not properly " + "configured. Contact the service administrators and let them " + "know! I will now leave."); jvbConference.stop(); return null; } jvbConferenceCall.setConference(new MediaAwareCallConference() { @Override public MediaDevice getDefaultDevice(MediaType mediaType, MediaUseCase useCase) { if(MediaType.AUDIO.equals(mediaType)) { return transcriber.getMediaDevice(); } return super.getDefaultDevice(mediaType, useCase); } }); for (TranscriptionResultPublisher pub : handler.getTranscriptResultPublishers()) { if (pub instanceof TranscriptionEventListener) transcriber.addTranscriptionEventListener( (TranscriptionEventListener)pub); } transcriber.addTranscriptionEventListener(this); transcriber.start(); addInitialMembers(); StringBuilder welcomeMessage = new StringBuilder("Started transcription!\n"); finalTranscriptPromises.addAll(handler.getTranscriptPublishPromises()); for(TranscriptPublisher.Promise promise : finalTranscriptPromises) { if(promise.hasDescription()) { welcomeMessage.append(promise.getDescription()); } promise.maybeStartRecording(transcriber.getMediaDevice()); } sendMessageToRoom(welcomeMessage.toString()); logger.debug("TranscriptionGatewaySession started transcribing"); return null; }