Changeset 35633 for main/trunk


Ignore:
Timestamp:
2021-10-18T21:29:06+13:00 (3 years ago)
Author:
cstephen
Message:

Limit word timing selection by length of audio.
Show time editing boundaries.

Location:
main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/TranscriptionItemEditor.vue

    r35631 r35633  
    2121
    2222    <word-timing-selector class="word-timing-selector" @wordUpdated="onWordUpdated" v-if="enableEditing"
    23         :surroundingWords="surroundingWords" :wordIndex="surroundingWordPrincipleIndex" />
     23        :surroundingWords="surroundingWords" :wordIndex="surroundingWordPrincipleIndex" :transcriptionID="transcription.id" />
    2424</div>
    2525</template>
  • main/trunk/model-interfaces-dev/atea/korero-maori-asr/src/components/WordTimingSelector.vue

    r35608 r35633  
    11<template>
    22<div class="word-timing-selector-root">
    3     <span>{{ minTimeString }}</span>
     3    <span class="boundary-time-string">{{ minTimeString }}</span>
     4    <div class="boundary" />
    45
    56    <div class="words-container" v-width="onWordsContainerWidthChanged">
     
    2425    </div>
    2526
    26     <span>{{ maxTimeString }}</span>
     27    <div class="boundary" />
     28    <span class="boundary-time-string">{{ maxTimeString }}</span>
    2729</div>
    2830</template>
     
    3335    align-items: flex-end;
    3436    justify-content: center;
    35     gap: 1em;
    3637    height: 3em;
    3738}
     
    4142    position: relative;
    4243    height: 1.5em;
     44}
     45
     46.boundary {
     47    width: 3px;
     48    background-color: rgba(var(--bg-color-raw), 0.6);
     49    height: 1.5em;
     50}
     51
     52.boundary-time-string {
     53    margin: 0 0.5em;
    4354}
    4455
     
    110121    name: "WordTimingSelector",
    111122    props: {
     123        transcriptionID: String,
    112124        /** @type {Array<TWord>} */
    113125        surroundingWords: Array,
     
    169181                }
    170182
    171                 // Gives 0.5s of time to play with while adjusting the last word.
     183                // The last word can be adjusted up to the length of the backing audio.
    172184                if (this.wordIndex === this.surroundingWords.length - 1) {
    173                     length += 0.5;
     185                    length = this.$store.getters.transcriptionPlaybackLength(this.transcriptionID) - this.surroundingWords[0].startTime;
    174186                }
    175187
Note: See TracChangeset for help on using the changeset viewer.