Changeset 35454
- Timestamp:
- 2021-09-23T14:13:40+12:00 (3 years ago)
- Location:
- main/trunk/model-interfaces-dev/atea
- Files:
-
- 1 added
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/model-interfaces-dev/atea/korero-maori-asr/README.md
r35389 r35454 25 25 Firstly, development-specific code needs to be changed. 26 26 27 1. In `TranscribeModule.js` change the `queryUrl` property to point to the primary transcribe endpoint.27 1. In `TranscribeModule.js` rename the transcribe methods to stop the test data being returned. 28 28 29 29 ```js 30 -- this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe/test"; 31 ++ this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe"; 30 -- async transcribeFiles(files) { 31 ++ async transcribeFilesTest(files) { 32 // And 33 -- async transcribeFilesActual(files) { 34 ++ async transcribeFiles(files) { 32 35 ``` 33 36 -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/App.vue
r35451 r35454 14 14 </div> 15 15 16 <div v-if="showInfo" class="paper"> 17 A tool to transcribe audio recordings of spoken MÄori. Basic support for editing the transcriptions is provided, 18 and they can be downloaded in multiple formats. 19 <br /> 20 The actual transcriptions are produced with gratitude by using <a href="https://koreromaori.io">koreromaori.io</a>'s service. 21 </div> 16 <div v-if="showInfo" class="paper" v-html="translations.get('Description')" /> 22 17 </div> 23 18 -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/AudioTimeBar.vue
r35451 r35454 3 3 <input type="range" class="slider-continuous" v-model.number="sliderValue" min="0" :max="audioLength" step="0.01" :disabled="isDisabled" /> 4 4 5 <button type="button" class="btn-fab " @click="stepBack" :disabled="isDisabled">5 <button type="button" class="btn-fab theme-flat" @click="stepBack" :disabled="isDisabled"> 6 6 <span class="material-icons mdi-s">arrow_back_ios_new</span> 7 7 </button> … … 9 9 <span>{{ stringSliderValue }}</span> 10 10 11 <button type="button" class="btn-fab " @click="stepForward" :disabled="isDisabled">11 <button type="button" class="btn-fab theme-flat" @click="stepForward" :disabled="isDisabled"> 12 12 <span class="material-icons mdi-s">arrow_forward_ios</span> 13 13 </button> -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/TranscriptionItemEditor.vue
r35451 r35454 20 20 </div> 21 21 22 <word-timing-selector :surroundingWords="getSurroundingWords()" /> 23 22 24 <div class="editor-controls"> 23 25 <audio-time-bar v-model.number="currentPlaybackTime" :audio-length="audioLength" :isDisabled="playbackState.id != transcription.id" /> … … 81 83 import AudioPlayback from "../js/AudioPlaybackModule" 82 84 import AudioTimeBar from "./AudioTimeBar.vue" 85 import WordTimingSelector from "./WordTimingSelector.vue" 83 86 import Util from "../js/Util"; 84 87 … … 114 117 name: "TranscriptionItemEditor", 115 118 components: { 116 AudioTimeBar 119 AudioTimeBar, 120 WordTimingSelector 117 121 }, 118 122 props: { … … 146 150 async playAudio(startTime) { 147 151 await AudioPlayback.play(this.transcription.id, startTime); 152 }, 153 getSurroundingWords() { 154 return this.words.slice(2, 7); 148 155 }, 149 156 /** -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/js/TranscribeModule.js
r35439 r35454 67 67 export default class TranscribeService { 68 68 constructor() { 69 /* eslint-disable quotes */ 70 this.TEST_JSON = '{"file_name":"akl_mi_pk_0002.wav","log":"Took 0.6s to transcribe 8.7s audio file /tmp/transcribe-aw7ujpu8-clean.wav","metadata":[{"char":"k","prob":7.0E-6,"start_time":0.24},{"char":"o","prob":8.3E-5,"start_time":0.26},{"char":"t","prob":0.995578,"start_time":0.42},{"char":"a","prob":0.997089,"start_time":0.44},{"char":"h","prob":3.0E-6,"start_time":0.54},{"char":"i","prob":8.0E-6,"start_time":0.56},{"char":" ","prob":2.2E-5,"start_time":0.6},{"char":"a","prob":0.982987,"start_time":0.64},{"char":"n","prob":5.0E-6,"start_time":0.8},{"char":"Å","prob":1.82E-4,"start_time":0.84},{"char":" ","prob":0.996944,"start_time":1.08},{"char":"t","prob":1.23E-4,"start_time":1.14},{"char":"e","prob":6.3E-5,"start_time":1.16},{"char":" ","prob":0.587595,"start_time":1.28},{"char":"t","prob":4.91E-4,"start_time":1.34},{"char":"u","prob":0.010654,"start_time":1.36},{"char":"p","prob":5.9E-5,"start_time":1.52},{"char":"u","prob":1.26E-4,"start_time":1.54},{"char":"n","prob":0.0,"start_time":1.7},{"char":"a","prob":0.99997,"start_time":1.72},{"char":" ","prob":0.993724,"start_time":2.14},{"char":"o","prob":4.3E-5,"start_time":2.22},{"char":" ","prob":0.99696,"start_time":2.32},{"char":"t","prob":1.4E-5,"start_time":2.36},{"char":"e","prob":3.8E-5,"start_time":2.38},{"char":" ","prob":0.996606,"start_time":2.48},{"char":"t","prob":0.0,"start_time":2.52},{"char":"a","prob":0.994873,"start_time":2.54},{"char":"Å","prob":2.9E-5,"start_time":2.64},{"char":"a","prob":0.994639,"start_time":2.66},{"char":"t","prob":3.0E-6,"start_time":2.8},{"char":"a","prob":0.99995,"start_time":2.82},{"char":" ","prob":0.0,"start_time":2.9},{"char":"m","prob":0.999606,"start_time":2.98},{"char":"Ä","prob":0.010628,"start_time":3.0},{"char":"o","prob":0.996415,"start_time":3.2},{"char":"r","prob":0.0,"start_time":3.28},{"char":"i","prob":0.999698,"start_time":3.32},{"char":" ","prob":0.997927,"start_time":4.5},{"char":"k","prob":0.0,"start_time":4.58},{"char":"o","prob":3.2E-5,"start_time":4.6},{"char":" ","prob":0.956949,"start_time":4.7},{"char":"r","prob":2.5E-5,"start_time":4.74},{"char":"a","prob":0.997649,"start_time":4.76},{"char":"Å","prob":0.0,"start_time":4.9},{"char":"i","prob":1.63E-4,"start_time":4.92},{"char":"n","prob":1.3E-5,"start_time":5.28},{"char":"u","prob":4.0E-6,"start_time":5.3},{"char":"i","prob":0.99997,"start_time":5.42},{"char":" ","prob":0.994305,"start_time":5.78},{"char":"e","prob":3.1E-5,"start_time":5.84},{"char":" ","prob":0.966097,"start_time":6.04},{"char":"t","prob":2.0E-6,"start_time":6.1},{"char":"Å«","prob":5.4E-5,"start_time":6.12},{"char":" ","prob":0.837368,"start_time":6.34},{"char":"n","prob":0.0,"start_time":6.38},{"char":"e","prob":0.004238,"start_time":6.4},{"char":"i","prob":0.99966,"start_time":6.5},{"char":" ","prob":0.99728,"start_time":7.28},{"char":"o","prob":6.28E-4,"start_time":7.36},{"char":" ","prob":0.961049,"start_time":7.48},{"char":"p","prob":5.0E-6,"start_time":7.52},{"char":"a","prob":0.984707,"start_time":7.54},{"char":"p","prob":9.0E-6,"start_time":7.66},{"char":"a","prob":0.998754,"start_time":7.68},{"char":"t","prob":0.002356,"start_time":7.88},{"char":"Å«","prob":1.24E-4,"start_time":7.9},{"char":"Ä","prob":0.883958,"start_time":8.0},{"char":"n","prob":0.985871,"start_time":8.24},{"char":"u","prob":0.907369,"start_time":8.26},{"char":"k","prob":0.999045,"start_time":8.38},{"char":"u","prob":0.995632,"start_time":8.4}],"success":true,"transcription":"kotahi anÅ te tupuna o te tangata mÄori ko ranginui e tÅ« nei o papatÅ«Änuku"}'; 71 /* eslint-enable quotes */ 72 69 73 /** @type {String} The URL to which query POST requests should be made. */ 70 this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe /test";74 this.queryUrl = "//localhost:8383/gs3-koreromaori/transcribe"; 71 75 72 76 /** @type {Number} The maximum number of files which can be transcribed in one request to the API. */ … … 117 121 */ 118 122 async transcribeFiles(files) { 123 const objects = []; 124 125 for (const file of files) { 126 const object = JSON.parse(this.TEST_JSON); 127 object.file_name = file.name; 128 objects.push(object); 129 } 130 131 return objects; 132 } 133 134 /** 135 * Performs a query to transcribe the given audio files. 136 * 137 * @param {FileList | File[]} files The files to upload. 138 * @returns {Promise<TranscriptionModel[]>} The transcribed audio file. 139 * @throws {TranscriptionError} When the transcription request fails to complete. 140 */ 141 async transcribeFilesActual(files) { 119 142 const that = this; 120 143 const formData = new FormData(); -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/main.js
r35450 r35454 162 162 163 163 const namespaceEndIndex = components[0].lastIndexOf("."); 164 translations.set(components[0].slice(namespaceEndIndex + 1), components [1]);164 translations.set(components[0].slice(namespaceEndIndex + 1), components.slice(1).join("=")); 165 165 } 166 166 -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/styles/_material.scss
r35451 r35454 73 73 border: none; 74 74 box-shadow: var(--primary-box-shadow-thin); 75 76 75 border-radius: var(--border-radius); 77 76 padding: 0.5em; 77 78 78 cursor: pointer; 79 79 font-size: 1rem; 80 font-weight: 400; 80 81 text-decoration: none; 81 82 … … 161 162 font-style: italic; 162 163 cursor: inherit; 164 user-select: none; 163 165 } 164 166 … … 448 450 449 451 &:hover { 450 --bg-color: rgba(var(--primary-bg-color), 0.15); //#EEE;452 --bg-color: rgba(var(--primary-bg-color), 0.15); 451 453 } 452 454 } -
main/trunk/model-interfaces-dev/atea/korero-maori-asr/vue.config.js
r35447 r35454 12 12 .plugin("html") 13 13 .tap(args => { 14 args[0].title = "Korero M aori Transcription Interface";14 args[0].title = "Korero MÄori Transcription Interface"; 15 15 return args; 16 16 }) -
main/trunk/model-interfaces-dev/atea/resources/interface_atea.properties
r35451 r35454 1 1 atea.Title=Korero MÄori Transcription Interface 2 atea.Description=A tool to transcribe audio recordings of spoken MÄori. Basic support for editing the transcriptions is provided, and they can be downloaded in multiple formats.<br />The actual transcriptions are produced with gratitude by using <a href='https://koreromaori.io'>koreromaori.io</a>'s service. 2 3 atea.ErrorTryAgain=Something went wrong! Please try again 3 4 -
main/trunk/model-interfaces-dev/atea/resources/interface_atea_mi.properties
r35451 r35454 1 1 atea.Title=Atanga Tuhituhi Korero MÄori 2 atea.Description=... 2 3 atea.ErrorTryAgain=Kua he tetahi mea! Tena koa ngana 3 4 -
main/trunk/model-interfaces-dev/atea/transform/pages/korero-maori-asr.xsl
r35448 r35454 16 16 <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable> 17 17 <!-- set page title --> 18 <xsl:template name="pageTitle">Korero Maori Transcription Interface</xsl:template> 18 <xsl:template name="pageTitle"> 19 <xsl:value-of disable-output-escaping="yes" select="util:getInterfaceText('atea', /page/@lang, 'atea.Title')"/> 20 </xsl:template> 19 21 20 22 <!-- set page breadcrumbs -->
Note:
See TracChangeset
for help on using the changeset viewer.