@@ -184,12 +184,6 @@ public class GoogleCloudTranscriptionService
184
184
private final static String P_NAME_USE_VIDEO_MODEL
185
185
= "org.jitsi.jigasi.transcription.USE_VIDEO_MODEL" ;
186
186
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
-
193
187
/**
194
188
* Property name to determine whether the Google Speech API should get
195
189
* automatic punctuation
@@ -209,11 +203,6 @@ public class GoogleCloudTranscriptionService
209
203
*/
210
204
private final static boolean DEFAULT_VALUE_USE_VIDEO_MODEL = false ;
211
205
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
-
217
206
/**
218
207
* The default value for the property ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION
219
208
*/
@@ -259,11 +248,6 @@ private static void validateLanguageTag(String tag)
259
248
*/
260
249
private boolean useVideoModel ;
261
250
262
- /**
263
- * Whether to send interim non-final results
264
- */
265
- private boolean enableInterimResults ;
266
-
267
251
/**
268
252
* Whether to get automatic punctuation
269
253
*/
@@ -341,9 +325,6 @@ public GoogleCloudTranscriptionService()
341
325
useVideoModel = JigasiBundleActivator .getConfigurationService ()
342
326
.getBoolean (P_NAME_USE_VIDEO_MODEL , DEFAULT_VALUE_USE_VIDEO_MODEL );
343
327
344
- enableInterimResults = JigasiBundleActivator .getConfigurationService ()
345
- .getBoolean (P_NAME_ENABLE_GOOGLE_INTERIM_RESULTS , DEFAULT_VALUE_ENABLE_GOOGLE_INTERIM_RESULTS );
346
-
347
328
enableAutomaticPunctuation = JigasiBundleActivator .getConfigurationService ()
348
329
.getBoolean (P_NAME_ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION , DEFAULT_VALUE_ENABLE_GOOGLE_AUTOMATIC_PUNCTUATION );
349
330
@@ -745,8 +726,7 @@ private ApiStreamObserver<StreamingRecognizeRequest> createObserver(
745
726
new ResponseApiStreamingObserver <StreamingRecognizeResponse >(
746
727
this ,
747
728
config .getLanguageCode (),
748
- debugName ,
749
- enableInterimResults );
729
+ debugName );
750
730
751
731
// StreamingRecognitionConfig which will hold information
752
732
// about the streaming session, including the RecognitionConfig
@@ -927,11 +907,6 @@ private static class ResponseApiStreamingObserver
927
907
*/
928
908
private UUID messageID ;
929
909
930
- /**
931
- * Whether to send interim results
932
- */
933
- private Boolean enableInterimResults ;
934
-
935
910
/**
936
911
* Google provides multiple results per API response where the first one
937
912
* contains the most stable part of the sentence and freshly transcribed
@@ -951,13 +926,11 @@ private static class ResponseApiStreamingObserver
951
926
*/
952
927
ResponseApiStreamingObserver (RequestApiStreamObserverManager manager ,
953
928
String languageTag ,
954
- String debugName ,
955
- Boolean enableInterimResults )
929
+ String debugName )
956
930
{
957
931
this .requestManager = manager ;
958
932
this .languageTag = languageTag ;
959
933
this .debugName = debugName ;
960
- this .enableInterimResults = enableInterimResults ;
961
934
962
935
messageID = UUID .randomUUID ();
963
936
}
@@ -1091,7 +1064,7 @@ private void handleResult(StreamingRecognitionResult result)
1091
1064
TranscriptionResult transcriptionResult = new TranscriptionResult (
1092
1065
null ,
1093
1066
this .messageID ,
1094
- !enableInterimResults && ! result .getIsFinal (),
1067
+ !result .getIsFinal (),
1095
1068
this .languageTag ,
1096
1069
result .getStability (),
1097
1070
new TranscriptionAlternative (
0 commit comments