@@ -184,12 +184,6 @@ public class GoogleCloudTranscriptionService
184184 private final static String P_NAME_USE_VIDEO_MODEL
185185 = "org.jitsi.jigasi.transcription.USE_VIDEO_MODEL" ;
186186
187- /**
188- * Property name to determine whether to send the interim results
189- */
190- private final static String P_NAME_ENABLE_GOOGLE_INTERIM_RESULTS
191- = "org.jitsi.jigasi.transcription.ENABLE_GOOGLE_INTERIM_RESULTS" ;
192-
193187 /**
194188 * Property name to determine whether the Google Speech API should get
195189 * automatic punctuation
@@ -209,11 +203,6 @@ public class GoogleCloudTranscriptionService
209203 */
210204 private final static boolean DEFAULT_VALUE_USE_VIDEO_MODEL = false ;
211205
212- /**
213- * The default value for the property ENABLE_GOOGLE_INTERIM_RESULTS
214- */
215- private final static boolean DEFAULT_VALUE_ENABLE_GOOGLE_INTERIM_RESULTS = false ;
216-
217206 /**
218207 * The default value for the property ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION
219208 */
@@ -259,11 +248,6 @@ private static void validateLanguageTag(String tag)
259248 */
260249 private boolean useVideoModel ;
261250
262- /**
263- * Whether to send interim non-final results
264- */
265- private boolean enableInterimResults ;
266-
267251 /**
268252 * Whether to get automatic punctuation
269253 */
@@ -341,9 +325,6 @@ public GoogleCloudTranscriptionService()
341325 useVideoModel = JigasiBundleActivator .getConfigurationService ()
342326 .getBoolean (P_NAME_USE_VIDEO_MODEL , DEFAULT_VALUE_USE_VIDEO_MODEL );
343327
344- enableInterimResults = JigasiBundleActivator .getConfigurationService ()
345- .getBoolean (P_NAME_ENABLE_GOOGLE_INTERIM_RESULTS , DEFAULT_VALUE_ENABLE_GOOGLE_INTERIM_RESULTS );
346-
347328 enableAutomaticPunctuation = JigasiBundleActivator .getConfigurationService ()
348329 .getBoolean (P_NAME_ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION , DEFAULT_VALUE_ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION );
349330
@@ -745,8 +726,7 @@ private ApiStreamObserver<StreamingRecognizeRequest> createObserver(
745726 new ResponseApiStreamingObserver <StreamingRecognizeResponse >(
746727 this ,
747728 config .getLanguageCode (),
748- debugName ,
749- enableInterimResults );
729+ debugName );
750730
751731 // StreamingRecognitionConfig which will hold information
752732 // about the streaming session, including the RecognitionConfig
@@ -927,11 +907,6 @@ private static class ResponseApiStreamingObserver
927907 */
928908 private UUID messageID ;
929909
930- /**
931- * Whether to send interim results
932- */
933- private Boolean enableInterimResults ;
934-
935910 /**
936911 * Google provides multiple results per API response where the first one
937912 * contains the most stable part of the sentence and freshly transcribed
@@ -951,13 +926,11 @@ private static class ResponseApiStreamingObserver
951926 */
952927 ResponseApiStreamingObserver (RequestApiStreamObserverManager manager ,
953928 String languageTag ,
954- String debugName ,
955- Boolean enableInterimResults )
929+ String debugName )
956930 {
957931 this .requestManager = manager ;
958932 this .languageTag = languageTag ;
959933 this .debugName = debugName ;
960- this .enableInterimResults = enableInterimResults ;
961934
962935 messageID = UUID .randomUUID ();
963936 }
@@ -1091,7 +1064,7 @@ private void handleResult(StreamingRecognitionResult result)
10911064 TranscriptionResult transcriptionResult = new TranscriptionResult (
10921065 null ,
10931066 this .messageID ,
1094- !enableInterimResults && ! result .getIsFinal (),
1067+ !result .getIsFinal (),
10951068 this .languageTag ,
10961069 result .getStability (),
10971070 new TranscriptionAlternative (
0 commit comments