Changeset 35283 for gs3-extensions/atea-nlp-tools
- Timestamp:
- 2021-08-11T16:03:52+12:00 (3 years ago)
- Location:
- gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gs3-extensions/atea-nlp-tools/trunk/src/koreromaori-proxy/src/main/java/org/atea/nlptools/koreromaoriproxy/TestServlet.java
r35260 r35283 96 96 } 97 97 98 AudioFilePart failedTranscription = new AudioFilePart("id10t.wav", null); 99 failedTranscription.setTranscriptionResult(new TranscriptionResult("Ruh roh!")); 100 audioFileParts.add(failedTranscription); 101 98 102 // Transform the Tuhituhi response into our own format 99 103 List<TranscriptionResultDto> responses = new ArrayList<TranscriptionResultDto>(audioFileParts.size()); … … 116 120 { 117 121 ArrayList<TranscriptionResultMetadata> metadata = new ArrayList<TranscriptionResultMetadata>(7); 118 for (int i = 0; i < 4; i++) 122 String transcription = ""; 123 124 for (int i = 0; i < 8; i++) 119 125 { 126 transcription += "ngÄ tama a rangi | "; 120 127 metadata.add(new TranscriptionResultMetadata('Å', 0.5, 0.44)); 121 128 metadata.add(new TranscriptionResultMetadata('Ä', 0.5, 0.46)); … … 132 139 metadata.add(new TranscriptionResultMetadata('Å', 0.5, 1.6)); 133 140 metadata.add(new TranscriptionResultMetadata('i', 0.5, 1.62)); 141 metadata.add(new TranscriptionResultMetadata(' ', 0.5, 1.62)); 134 142 metadata.add(new TranscriptionResultMetadata('|', 0.5, 1.62)); 143 metadata.add(new TranscriptionResultMetadata(' ', 0.5, 1.62)); 135 144 } 136 145 137 return new TranscriptionResult("Generated a mock transcription of akl_mi_pk_0001.wav", metadata, "1.0-fake", true, "ngÄ tama a rangi");146 return new TranscriptionResult("Generated a mock transcription of akl_mi_pk_0001.wav", metadata, "1.0-fake", true, transcription); 138 147 } 139 148 }
Note:
See TracChangeset
for help on using the changeset viewer.