@@ -212,7 +212,7 @@ public void testGetModelNoOptions() throws Throwable {
212212 public void testRecognizeWOptions () throws Throwable {
213213 // Register a mock response
214214 String mockResponseBody =
215- "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}" ;
215+ "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}" ;
216216 String recognizePath = "/v1/recognize" ;
217217 server .enqueue (
218218 new MockResponse ()
@@ -426,7 +426,7 @@ public void testUnregisterCallbackNoOptions() throws Throwable {
426426 public void testCreateJobWOptions () throws Throwable {
427427 // Register a mock response
428428 String mockResponseBody =
429- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
429+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
430430 String createJobPath = "/v1/recognitions" ;
431431 server .enqueue (
432432 new MockResponse ()
@@ -546,7 +546,7 @@ public void testCreateJobNoOptions() throws Throwable {
546546 public void testCheckJobsWOptions () throws Throwable {
547547 // Register a mock response
548548 String mockResponseBody =
549- "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}]}" ;
549+ "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}]}" ;
550550 String checkJobsPath = "/v1/recognitions" ;
551551 server .enqueue (
552552 new MockResponse ()
@@ -591,7 +591,7 @@ public void testCheckJobsWRetries() throws Throwable {
591591 public void testCheckJobWOptions () throws Throwable {
592592 // Register a mock response
593593 String mockResponseBody =
594- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [\" timestamps\" ], \" word_confidence\" : [\" wordConfidence\" ]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
594+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" timestamps\" ]], \" word_confidence\" : [[\" wordConfidence\" ]]}], \" keywords_result\" : {\" mapKey\" : [{\" normalized_text\" : \" normalizedText\" , \" start_time\" : 9, \" end_time\" : 7, \" confidence\" : 0}]}, \" word_alternatives\" : [{\" start_time\" : 9, \" end_time\" : 7, \" alternatives\" : [{\" confidence\" : 0, \" word\" : \" word\" }]}], \" end_of_utterance\" : \" end_of_data\" }], \" result_index\" : 11, \" speaker_labels\" : [{\" from\" : 4, \" to\" : 2, \" speaker\" : 7, \" confidence\" : 10, \" final\" : true}], \" processing_metrics\" : {\" processed_audio\" : {\" received\" : 8, \" seen_by_engine\" : 12, \" transcription\" : 13, \" speaker_labels\" : 13}, \" wall_clock_since_first_byte_received\" : 31, \" periodic\" : true}, \" audio_metrics\" : {\" sampling_interval\" : 16, \" accumulated\" : {\" final\" : true, \" end_time\" : 7, \" signal_to_noise_ratio\" : 18, \" speech_ratio\" : 11, \" high_frequency_loss\" : 17, \" direct_current_offset\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" clipping_rate\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}], \" non_speech_level\" : [{\" begin\" : 5, \" end\" : 3, \" count\" : 5}]}}, \" warnings\" : [\" warnings\" ]}], \" warnings\" : [\" warnings\" ]}" ;
595595 String checkJobPath = "/v1/recognitions/testString" ;
596596 server .enqueue (
597597 new MockResponse ()
0 commit comments