@@ -215,7 +215,7 @@ public void testGetModelNoOptions() throws Throwable {
215215 public void testRecognizeWOptions () throws Throwable {
216216 // Schedule some responses.
217217 String mockResponseBody =
218- "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
218+ "{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
219219 String recognizePath = "/v1/recognize" ;
220220
221221 server .enqueue (
@@ -425,7 +425,7 @@ public void testUnregisterCallbackNoOptions() throws Throwable {
425425 public void testCreateJobWOptions () throws Throwable {
426426 // Schedule some responses.
427427 String mockResponseBody =
428- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
428+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
429429 String createJobPath = "/v1/recognitions" ;
430430
431431 server .enqueue (
@@ -542,7 +542,7 @@ public void testCreateJobNoOptions() throws Throwable {
542542 public void testCheckJobsWOptions () throws Throwable {
543543 // Schedule some responses.
544544 String mockResponseBody =
545- "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}]}" ;
545+ "{\" recognitions\" : [{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}]}" ;
546546 String checkJobsPath = "/v1/recognitions" ;
547547
548548 server .enqueue (
@@ -581,7 +581,7 @@ public void testCheckJobsWOptions() throws Throwable {
581581 public void testCheckJobWOptions () throws Throwable {
582582 // Schedule some responses.
583583 String mockResponseBody =
584- "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
584+ "{\" id\" : \" id\" , \" status\" : \" waiting\" , \" created\" : \" created\" , \" updated\" : \" updated\" , \" url\" : \" url\" , \" user_token\" : \" userToken\" , \" results\" : [{\" results\" : [{\" final\" : true, \" alternatives\" : [{\" transcript\" : \" transcript\" , \" confidence\" : 0, \" timestamps\" : [[\" several\" , 1.0, 1.51], [\" tornadoes\" , 1.51, 2.15], [\" touch\" , 2.15, 2.5]], \" word_confidence\" : [[\" you\" , 0.36485132893469713]]}], \" 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\" ]}" ;
585585 String checkJobPath = "/v1/recognitions/testString" ;
586586
587587 server .enqueue (
0 commit comments