├── .babelrc ├── .codeclimate.yml ├── .eslintrc ├── .gitignore ├── .travis.yml ├── LICENSE ├── README.md ├── bin └── cli.js ├── package.json ├── schema.json ├── src ├── Speaker.js ├── Transcript.js ├── TranscriptSegment.js ├── TranscriptWord.js ├── __tests__ │ ├── Transcript.test.js │ ├── TranscriptSegment.test.js │ └── fixtures │ │ ├── invalid-transcript.json │ │ ├── valid-transcript-with-guids.json │ │ └── valid-transcript.json ├── adapters │ ├── GentleAdapter.js │ ├── KaldiAdapter.js │ ├── MediaTaggerAdapter.js │ ├── OctoAdapter.js │ └── __tests__ │ │ ├── GentleAdapter.test.js │ │ ├── KaldiAdapter.test.js │ │ └── fixtures │ │ ├── gentle-response.json │ │ ├── kaldi-1-expected-transcript.json │ │ ├── kaldi-1-segmentation.json │ │ ├── kaldi-1-transcription.json │ │ ├── kaldi-2-segmentation.json │ │ └── kaldi-2-transcription.json └── index.js └── yarn.lock /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "env" 4 | ], 5 | "plugins": [ 6 | "transform-object-rest-spread" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /.codeclimate.yml: -------------------------------------------------------------------------------- 1 | exclude_paths: 2 | - lib/**/* 3 | -------------------------------------------------------------------------------- /.eslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "eslint-config-airbnb-base", 3 | "env": { 4 | "jest": true 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .DS_Store 3 | npm-debug.log 4 | lib 5 | yarn-error.log 6 | coverage -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - '6' 4 | deploy: 5 | provider: npm 6 | email: alex@alexnorton.com 7 | skip_cleanup: true 8 | api_key: 9 | secure: fUZ13oVLfJMDILyOqfOu2qo9XiEuGMXvVFRvaH58S0wDq2LjaXPKtsDEI4tOT3hPRmkcP2lFxB8R/+HRuNst/PjouOETNuuwpuiqbhbYpPvzqqraSGvg4SU2JNLFSjafIX3WhDkCx9I8Zb0nwPlKAEP2Hn8GhoO29WtuTdekf2ZquyojJQTvzvNThey3SoBEj/UxqYn39KdolCnsKxhC/6IVhKFOdcB/afSia4YUssT1zlQ9lLhlVUwZDtusn4KVisEJr4Q4iuQrWeBkIpVXAknhssGG+TdNiaJjkOZ/ipaIQePyRY5bekPs5YIgGayelERzZ7UOQxN7PqbCYEOOZ6hRcGu/Ok3jInut/vM+QxZFTSoHgDyPR2oYKH6j2UDZrlX1kjRVz/6Q1Ncbh6sjZyhdpJdrtswnjFYr/Pj88yI1fa7KbIvONKgDlAtztp6ZtQQCnoIyoLc2qFh5be2TC9LCj/kYOmXbeOG9phNgUPJ8TuqsNW9KIb/NH2msf2Ghq76L10hiOY9bxW1sdh0gAG3xXKalq1QkSn2yK6jphc6/KCtb8HS7lb9juJrqVGmO1PIOl+l7yB3tuuikMHC6nZqeBCYrm2PNbDT5q4XBfBzdIgfJOKpkXXzuPkM0r8QeHVYPYK9HmGkbeaJIeYd0F6HDivfqONC4m12Wlh9lPCo= 10 | on: 11 | tags: true 12 | repo: bbc/transcript-model 13 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 BBC 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # transcript-model 2 | 3 | [![Build Status](https://travis-ci.org/alexnorton/transcript-model.svg?branch=master)](https://travis-ci.org/alexnorton/transcript-model) [![npm](https://img.shields.io/npm/v/transcript-model.svg)](https://www.npmjs.com/package/transcript-model) 4 | 5 | JSON schema and JavaScript model classes for dealing with time-aligned transcripts of speech. 6 | 7 | ## Usage 8 | 9 | Install in your project 10 | 11 | ``` 12 | $ npm install --save transcript-model 13 | ``` 14 | 15 | Then 16 | 17 | ```js 18 | const { Transcript } = require('transcript-model'); 19 | 20 | // Define some transcript JSON 21 | const json = { 22 | speakers: [{ name: 'Alice' }, { name: 'Bob' }], 23 | segments: [ 24 | { 25 | speaker: 0, 26 | words: [ 27 | { start: 0.05, end: 0.64, text: 'Hello' }, 28 | { start: 0.7, end: 1.1, text: 'Bob!' }, 29 | ], 30 | }, 31 | { 32 | speaker: 1, 33 | words: [ 34 | { start: 1.53, end: 1.88, text: 'Hi' }, 35 | { start: 1.92, end: 2.33, text: 'Alice.' }, 36 | ], 37 | }, 38 | ], 39 | }; 40 | 41 | // Instantiate a Transcript object 42 | const transcript = Transcript.fromJson(json); 43 | 44 | // Do something with it 45 | console.log( 46 | transcript.segments 47 | .map( 48 | segment => 49 | `${transcript.speakers.get(segment.speaker).name}: ${segment.words 50 | .map(word => word.text) 51 | .join(' ')}` 52 | ) 53 | .join('\n') 54 | ); 55 | 56 | // Serialise as JSON 57 | console.log(transcript.toJson()); 58 | ``` 59 | 60 | Try it out on [RunKit](https://runkit.com/alexnorton/runkit-npm-transcript-model). 61 | 62 | For more examples of creating and manipulating Transcript objects check out the source code. 63 | 64 | ## CLI 65 | 66 | A basic command line interface has been implemented to support conversion of BBC Kaldi output to the transcript JSON format. 67 | 68 | ### Install 69 | 70 | ``` 71 | $ npm install -g transcript-model 72 | ``` 73 | 74 | ### Usage 75 | 76 | To write to STDOUT: 77 | 78 | ```bash 79 | $ transcript-model --kaldi path/to/transcript.json path/to/segments.json 80 | ``` 81 | 82 | To write to a file: 83 | 84 | ``` 85 | $ transcript-model --kaldi path/to/transcript.json path/to/segments.json > output.json 86 | ``` 87 | 88 | ## Author 89 | 90 | - [Alex Norton](https://github.com/alexnorton/) 91 | -------------------------------------------------------------------------------- /bin/cli.js: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /* eslint-disable no-console */ 4 | 5 | const { Transcript } = require('../lib'); 6 | const fs = require('fs'); 7 | 8 | const [mode, ...inputs] = process.argv.slice(2); 9 | 10 | if (mode === '--kaldi' && inputs.length === 2) { 11 | const transcriptFile = fs.readFileSync(inputs[0]); 12 | const segmentsFile = fs.readFileSync(inputs[1]); 13 | 14 | const transcriptJSON = JSON.parse(transcriptFile); 15 | const segmentsJSON = JSON.parse(segmentsFile); 16 | 17 | const transcript = Transcript.fromKaldi(transcriptJSON, segmentsJSON); 18 | 19 | console.log(JSON.stringify(transcript.toJson(), null, 2)); 20 | } else if (mode === '--octo' && inputs.length === 1) { 21 | const inputFile = fs.readFileSync(inputs[0]); 22 | 23 | const inputJson = JSON.parse(inputFile); 24 | 25 | const transcript = Transcript.fromOcto(inputJson); 26 | 27 | console.log(JSON.stringify(transcript.toJson(), null, 2)); 28 | } else if (mode === '--gentle' && inputs.length === 1) { 29 | const inputFile = fs.readFileSync(inputs[0]); 30 | 31 | const inputJson = JSON.parse(inputFile); 32 | 33 | const transcript = Transcript.fromGentle(inputJson); 34 | 35 | console.log(JSON.stringify(transcript.toJson(), null, 2)); 36 | } else { 37 | console.log('Usage:'); 38 | console.log(' transcript-model --kaldi path/to/transcript.json path/to/segments.json'); 39 | console.log(' transcript-model --octo path/to/input.json'); 40 | console.log(' transcript-model --gentle path/to/input.json'); 41 | } 42 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "transcript-model", 3 | "version": "0.7.0", 4 | "description": "JSON schema and JavaScript model classes for dealing with time-aligned transcripts of speech.", 5 | "main": "lib/index.js", 6 | "scripts": { 7 | "test": "jest", 8 | "prepare": "babel -d lib --copy-files --ignore '**/__tests__' src/" 9 | }, 10 | "bin": { 11 | "transcript-model": "./bin/cli.js" 12 | }, 13 | "repository": { 14 | "type": "git", 15 | "url": "git+https://github.com/bbc/transcript-model.git" 16 | }, 17 | "author": "Alex Norton ", 18 | "license": "MIT", 19 | "bugs": { 20 | "url": "https://github.com/bbc/transcript-model/issues" 21 | }, 22 | "homepage": "https://github.com/bbc/transcript-model#readme", 23 | "dependencies": { 24 | "ajv": "^6.1.1", 25 | "immutable": "^3.8.2" 26 | }, 27 | "devDependencies": { 28 | "babel-cli": "^6.26.0", 29 | "babel-core": "^6.26.0", 30 | "babel-jest": "^22.2.2", 31 | "babel-plugin-transform-object-rest-spread": "^6.26.0", 32 | "babel-preset-env": "^1.6.1", 33 | "eslint": "^4.9.0", 34 | "eslint-config-airbnb-base": "^12.1.0", 35 | "eslint-plugin-import": "^2.7.0", 36 | "jest": "^22.3.0" 37 | }, 38 | "files": [ 39 | "lib/", 40 | "bin/", 41 | "src/", 42 | "schema.json" 43 | ] 44 | } 45 | -------------------------------------------------------------------------------- /schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "type": "object", 3 | "properties": { 4 | "speakers": { 5 | "type": "array", 6 | "items": { 7 | "type": "object", 8 | "properties": { 9 | "name": { 10 | "type": [ 11 | "string", 12 | "null" 13 | ] 14 | } 15 | }, 16 | "required": [ 17 | "name" 18 | ] 19 | } 20 | }, 21 | "segments": { 22 | "type": "array", 23 | "items": { 24 | "type": "object", 25 | "properties": { 26 | "speaker": { 27 | "type": "integer" 28 | }, 29 | "words": { 30 | "type": "array", 31 | "items": { 32 | "type": "object", 33 | "properties": { 34 | "text": { 35 | "type": "string" 36 | }, 37 | "start": { 38 | "type": "number" 39 | }, 40 | "end": { 41 | "type": "number" 42 | }, 43 | "guid": { 44 | "type": "string", 45 | "format": "uuid" 46 | } 47 | }, 48 | "required": [ 49 | "text", 50 | "start", 51 | "end" 52 | ], 53 | "additionalProperties": false 54 | } 55 | } 56 | }, 57 | "required": [ 58 | "speaker", 59 | "words" 60 | ], 61 | "additionalProperties": false 62 | } 63 | } 64 | }, 65 | "additionalProperties": false, 66 | "required": [ 67 | "speakers", 68 | "segments" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /src/Speaker.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | const SpeakerRecord = new Immutable.Record({ 4 | name: null, 5 | }); 6 | 7 | class Speaker extends SpeakerRecord { 8 | 9 | } 10 | 11 | export default Speaker; 12 | -------------------------------------------------------------------------------- /src/Transcript.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | import Ajv from 'ajv'; 3 | 4 | import TranscriptSegment from './TranscriptSegment'; 5 | import TranscriptWord from './TranscriptWord'; 6 | import Speaker from './Speaker'; 7 | import KaldiAdapter from './adapters/KaldiAdapter'; 8 | import MediaTaggerAdapter from './adapters/MediaTaggerAdapter'; 9 | import OctoAdapter from './adapters/OctoAdapter'; 10 | import GentleAdapter from './adapters/GentleAdapter'; 11 | 12 | import schema from '../schema.json'; 13 | 14 | const TranscriptRecord = new Immutable.Record({ 15 | speakers: new Immutable.List(), 16 | segments: new Immutable.List(), 17 | }); 18 | 19 | class Transcript extends TranscriptRecord { 20 | static fromJson(json) { 21 | this.validateJson(json); 22 | 23 | const speakers = new Immutable.List(json.speakers.map(speaker => new Speaker(speaker))); 24 | 25 | const segments = new Immutable.List(json.segments.map(({ speaker, words }) => 26 | new TranscriptSegment({ 27 | speaker, 28 | words: new Immutable.List(words.map(({ 29 | start, end, text, guid, 30 | }) => 31 | new TranscriptWord({ 32 | start, 33 | end, 34 | text, 35 | id: guid, 36 | }))), 37 | }))); 38 | 39 | return new Transcript({ 40 | speakers, 41 | segments, 42 | }); 43 | } 44 | 45 | static fromMediaTagger(json) { 46 | return MediaTaggerAdapter.parse(json); 47 | } 48 | 49 | static fromKaldi(transcriptJson, segmentsJson) { 50 | return KaldiAdapter.parse(transcriptJson, segmentsJson); 51 | } 52 | 53 | static fromOcto(json) { 54 | return OctoAdapter.parse(json); 55 | } 56 | 57 | static fromGentle(json) { 58 | return GentleAdapter.parse(json); 59 | } 60 | 61 | static validateJson(json) { 62 | const ajv = new Ajv(); 63 | const valid = ajv.validate(schema, json); 64 | if (!valid) { 65 | throw new Error(`invalid transcript JSON:\n${JSON.stringify(ajv.errors, null, 2)}`); 66 | } 67 | return true; 68 | } 69 | 70 | slice(start = 0, end) { 71 | const segments = this.segments 72 | .filter(segment => segment.getEnd() > start && (segment.getStart() < end || !end)) 73 | .map(segment => 74 | new TranscriptSegment({ 75 | speaker: segment.speaker, 76 | words: segment.words.filter(word => 77 | word.end > start && (word.start < end || !end)) 78 | .map(word => 79 | new TranscriptWord({ 80 | start: word.start - start >= 0 ? word.start - start : 0, 81 | end: word.end - start, 82 | id: word.id, 83 | text: word.text, 84 | })), 85 | })); 86 | 87 | return new Transcript({ speakers: this.speakers, segments }); 88 | } 89 | 90 | toJson() { 91 | return { 92 | speakers: this.speakers.toArray().map(speaker => ({ 93 | name: speaker.name, 94 | })), 95 | segments: this.segments.toArray().map(segment => ({ 96 | words: segment.words.toArray().map(word => ({ 97 | text: word.text, 98 | start: word.start, 99 | end: word.end, 100 | })), 101 | speaker: segment.speaker, 102 | })), 103 | }; 104 | } 105 | } 106 | 107 | export default Transcript; 108 | -------------------------------------------------------------------------------- /src/TranscriptSegment.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | const TranscriptSegmentRecord = new Immutable.Record({ 4 | speaker: null, 5 | words: new Immutable.List(), 6 | }); 7 | 8 | class TranscriptSegment extends TranscriptSegmentRecord { 9 | getStart() { 10 | return this.words.first().get('start'); 11 | } 12 | 13 | getEnd() { 14 | return this.words.last().get('end'); 15 | } 16 | 17 | getText() { 18 | return this.words.map(w => w.get('text')).join(' '); 19 | } 20 | } 21 | 22 | export default TranscriptSegment; 23 | -------------------------------------------------------------------------------- /src/TranscriptWord.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | const TranscriptWordRecord = new Immutable.Record({ 4 | id: null, 5 | text: '', 6 | start: 0, 7 | end: 0, 8 | }); 9 | 10 | class TranscriptWord extends TranscriptWordRecord { 11 | 12 | } 13 | 14 | export default TranscriptWord; 15 | -------------------------------------------------------------------------------- /src/__tests__/Transcript.test.js: -------------------------------------------------------------------------------- 1 | import fs from 'fs'; 2 | import path from 'path'; 3 | 4 | import Transcript from '../Transcript'; 5 | import TranscriptSegment from '../TranscriptSegment'; 6 | import TranscriptWord from '../TranscriptWord'; 7 | 8 | import Speaker from '../Speaker'; 9 | 10 | describe('validateJSON', () => { 11 | it('correctly validates valid transcripts', () => { 12 | const validTranscript = JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/valid-transcript.json'), 'utf8')); 13 | 14 | expect(Transcript.validateJson(validTranscript)).toBe(true); 15 | }); 16 | 17 | it('correctly validates valid transcripts with GUIDs', () => { 18 | const validTranscript = JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/valid-transcript-with-guids.json'), 'utf8')); 19 | 20 | expect(Transcript.validateJson(validTranscript)).toBe(true); 21 | }); 22 | 23 | it('correctly validates invalid transcript', () => { 24 | const invalidTranscript = JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/invalid-transcript.json'), 'utf8')); 25 | 26 | expect(() => Transcript.validateJson(invalidTranscript)).toThrow(); 27 | }); 28 | }); 29 | 30 | describe('fromJSON', () => { 31 | it('creates an instance from JSON', () => { 32 | const transcriptJSON = JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/valid-transcript-with-guids.json'), 'utf8')); 33 | 34 | const transcript = Transcript.fromJson(transcriptJSON); 35 | 36 | expect(transcript instanceof Transcript).toBe(true); 37 | 38 | expect(transcript.get('speakers').size).toBe(2); 39 | expect(transcript.get('speakers').get(0) instanceof Speaker).toBe(true); 40 | expect(transcript.get('speakers').toJS()).toEqual([{ name: 'Barack Obama' }, { name: null }]); 41 | 42 | expect(transcript.get('segments').size).toBe(2); 43 | expect(transcript.get('segments').get(1) instanceof TranscriptSegment).toBe(true); 44 | 45 | expect(transcript 46 | .get('segments') 47 | .get(1) 48 | .toJS()).toEqual({ 49 | speaker: 1, 50 | words: [ 51 | { 52 | text: 'Hi', 53 | start: 1.53, 54 | end: 1.88, 55 | id: '74DDAC87-E7B6-4DB3-AC48-9CA5FFEDF48A', 56 | }, 57 | { 58 | text: 'Barack.', 59 | start: 1.92, 60 | end: 2.33, 61 | id: '11303237-8E06-420B-87B1-1E16DF026985', 62 | }, 63 | ], 64 | }); 65 | 66 | const word = transcript 67 | .get('segments') 68 | .get(1) 69 | .get('words') 70 | .get(0); 71 | 72 | expect(word instanceof TranscriptWord).toBe(true); 73 | }); 74 | }); 75 | 76 | describe('toJson', () => { 77 | it('produces valid transcript JSON', () => { 78 | const originalTranscriptJSON = JSON.parse(fs.readFileSync(path.join(__dirname, '/fixtures/valid-transcript-with-guids.json'), 'utf8')); 79 | 80 | const transcript = Transcript.fromJson(originalTranscriptJSON); 81 | 82 | const transcriptJSON = transcript.toJson(); 83 | 84 | expect(Transcript.validateJson(transcriptJSON)).toBe(true); 85 | }); 86 | }); 87 | -------------------------------------------------------------------------------- /src/__tests__/TranscriptSegment.test.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | import TranscriptSegment from '../TranscriptSegment'; 4 | import TranscriptWord from '../TranscriptWord'; 5 | 6 | const createSegment = () => ( 7 | new TranscriptSegment({ 8 | words: new Immutable.List([ 9 | new TranscriptWord({ start: 0.1, end: 0.5, text: 'hello' }), 10 | new TranscriptWord({ start: 0.6, end: 0.9, text: 'this' }), 11 | new TranscriptWord({ start: 1.05, end: 1.2, text: 'is' }), 12 | new TranscriptWord({ start: 1.3, end: 1.4, text: 'a' }), 13 | new TranscriptWord({ start: 1.5, end: 1.77, text: 'test' }), 14 | ]), 15 | }) 16 | ); 17 | 18 | describe('getStart', () => { 19 | it('returns the start time of the segment', () => { 20 | const transcriptSegment = createSegment(); 21 | 22 | expect(transcriptSegment.getStart()).toEqual(0.1); 23 | }); 24 | }); 25 | 26 | describe('getEnd', () => { 27 | it('returns the end time of the segment', () => { 28 | const transcriptSegment = createSegment(); 29 | 30 | expect(transcriptSegment.getEnd()).toEqual(1.77); 31 | }); 32 | }); 33 | 34 | describe('getText', () => { 35 | it('return the text of the segment', () => { 36 | const transcriptSegment = createSegment(); 37 | 38 | expect(transcriptSegment.getText()).toEqual('hello this is a test'); 39 | }); 40 | }); 41 | -------------------------------------------------------------------------------- /src/__tests__/fixtures/invalid-transcript.json: -------------------------------------------------------------------------------- 1 | { 2 | "animals": [ 3 | "ponies", 4 | "horses", 5 | "pigs" 6 | ], 7 | "speakers": [ 8 | "Barack Obama", 9 | "Donald Trump" 10 | ], 11 | "segments": [ 12 | { 13 | "words": [ 14 | { 15 | "start": "the beginning", 16 | "end": 0.64 17 | }, 18 | { 19 | "text": "Donald!", 20 | "start": 0.70, 21 | "end": "the end" 22 | } 23 | ], 24 | "speaker": "trump" 25 | }, 26 | { 27 | "words": [ 28 | { 29 | "text": "Hi", 30 | "start": -1, 31 | "end": 1.88, 32 | "guid": "a guid" 33 | }, 34 | { 35 | "text": "Barack.", 36 | "start": 1.92, 37 | "end": 2.33 38 | } 39 | ], 40 | "speaker": 1 41 | } 42 | ] 43 | } 44 | -------------------------------------------------------------------------------- /src/__tests__/fixtures/valid-transcript-with-guids.json: -------------------------------------------------------------------------------- 1 | { 2 | "speakers": [ 3 | { 4 | "name": "Barack Obama" 5 | }, 6 | { 7 | "name": null 8 | } 9 | ], 10 | "segments": [ 11 | { 12 | "words": [ 13 | { 14 | "text": "Hello", 15 | "start": 0.05, 16 | "end": 0.64, 17 | "guid": "58E7D23C-9E2F-497D-9654-B79F52006B28" 18 | }, 19 | { 20 | "text": "Donald!", 21 | "start": 0.70, 22 | "end": 1.1, 23 | "guid": "32D4F441-2EBB-4005-9A0E-05CB4EA8019D" 24 | } 25 | ], 26 | "speaker": 0 27 | }, 28 | { 29 | "words": [ 30 | { 31 | "text": "Hi", 32 | "start": 1.53, 33 | "end": 1.88, 34 | "guid": "74DDAC87-E7B6-4DB3-AC48-9CA5FFEDF48A" 35 | }, 36 | { 37 | "text": "Barack.", 38 | "start": 1.92, 39 | "end": 2.33, 40 | "guid": "11303237-8E06-420B-87B1-1E16DF026985" 41 | } 42 | ], 43 | "speaker": 1 44 | } 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /src/__tests__/fixtures/valid-transcript.json: -------------------------------------------------------------------------------- 1 | { 2 | "speakers": [ 3 | { 4 | "name": "Barack Obama" 5 | }, 6 | { 7 | "name": null 8 | } 9 | ], 10 | "segments": [ 11 | { 12 | "words": [ 13 | { 14 | "text": "Hello", 15 | "start": 0.05, 16 | "end": 0.64 17 | }, 18 | { 19 | "text": "Donald!", 20 | "start": 0.70, 21 | "end": 1.1 22 | } 23 | ], 24 | "speaker": 0 25 | }, 26 | { 27 | "words": [ 28 | { 29 | "text": "Hi", 30 | "start": 1.53, 31 | "end": 1.88 32 | }, 33 | { 34 | "text": "Barack.", 35 | "start": 1.92, 36 | "end": 2.33 37 | } 38 | ], 39 | "speaker": 1 40 | } 41 | ] 42 | } 43 | -------------------------------------------------------------------------------- /src/adapters/GentleAdapter.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | import Speaker from '../Speaker'; 4 | import TranscriptSegment from '../TranscriptSegment'; 5 | import TranscriptWord from '../TranscriptWord'; 6 | import Transcript from '../Transcript'; 7 | 8 | const matchAll = (regex, text) => { 9 | const matches = []; 10 | let match = null; 11 | // eslint-disable-next-line no-cond-assign 12 | while ((match = regex.exec(text)) !== null) { 13 | matches.push(match); 14 | } 15 | return matches; 16 | }; 17 | 18 | export const getComponents = (text, delimeter) => { 19 | const matches = matchAll(delimeter, text); 20 | 21 | const componentRanges = []; 22 | 23 | matches.forEach((match, index) => { 24 | if (componentRanges.length === 0) { 25 | componentRanges.push({ 26 | startIndex: 0, 27 | endIndex: match.index, 28 | }); 29 | } 30 | 31 | componentRanges.push({ 32 | startIndex: match.index + match[0].length, 33 | endIndex: matches[index + 1] ? matches[index + 1].index : text.length, 34 | }); 35 | }); 36 | 37 | const components = componentRanges.map(segment => ({ 38 | ...segment, 39 | text: text.substring(segment.startIndex, segment.endIndex), 40 | })); 41 | 42 | return components; 43 | }; 44 | 45 | export const getSegments = text => getComponents(text, /[\r\n]+/igm); 46 | 47 | export const getWords = text => getComponents(text, /[ -]+/igm); 48 | 49 | export const stripPunctuation = word => word.replace(/[^\w]/g, ''); 50 | 51 | export const getWordDurationEquation = (gentleWords) => { 52 | const sum = [0, 0, 0, 0, 0]; 53 | 54 | gentleWords 55 | .filter(word => word.start !== undefined) 56 | .forEach((word) => { 57 | const wordLength = stripPunctuation(word.word).length; 58 | const wordDuration = word.end - word.start; 59 | sum[0] += wordLength; 60 | sum[1] += wordDuration; 61 | sum[2] += wordLength * wordLength; 62 | sum[3] += wordLength * wordDuration; 63 | sum[4] += wordDuration * wordDuration; 64 | }); 65 | 66 | const run = ((gentleWords.length * sum[2]) - (sum[0] * sum[0])); 67 | const rise = ((gentleWords.length * sum[3]) - (sum[0] * sum[1])); 68 | const gradient = run === 0 ? 0 : rise / run; 69 | const intercept = (sum[1] / gentleWords.length) - ((gradient * sum[0]) / gentleWords.length); 70 | 71 | return { gradient, intercept }; 72 | }; 73 | 74 | export const getEstimatedWordDuration = (length, { gradient, intercept }) => 75 | intercept + (length * gradient); 76 | 77 | export const interpolateSegmentWordTimings = (segmentWords, wordDurationEquation) => { 78 | const interpolatedSegmentWords = []; 79 | 80 | for (let i = 0; i < segmentWords.length; i += 1) { 81 | if (!segmentWords[i].startTime) { 82 | const untimedWords = []; 83 | 84 | while (segmentWords[i] && !segmentWords[i].startTime) { 85 | untimedWords.push(segmentWords[i]); 86 | i += 1; 87 | } 88 | 89 | let interpolatedUntimedWords; 90 | 91 | if (interpolatedSegmentWords.length === 0 && !segmentWords[i]) { 92 | // segment has no timed words 93 | interpolatedUntimedWords = untimedWords; 94 | } else { 95 | const relativeEstimatedWordTimings = untimedWords.reduce( 96 | (words, word) => { 97 | const startTime = words.reduce((total, { duration }) => total + duration, 0); 98 | 99 | const duration = getEstimatedWordDuration( 100 | stripPunctuation(word.text).length, 101 | wordDurationEquation, 102 | ); 103 | 104 | return [...words, { startTime, duration }]; 105 | }, 106 | [], 107 | ); 108 | 109 | const totalEstimatedDuration = relativeEstimatedWordTimings.reduce( 110 | (total, { duration }) => total + duration, 111 | 0, 112 | ); 113 | 114 | if (interpolatedSegmentWords.length === 0 || !segmentWords[i]) { 115 | let untimedStart; 116 | 117 | if (interpolatedSegmentWords.length === 0) { 118 | // untimed words are at start of segment 119 | untimedStart = segmentWords[i].startTime - totalEstimatedDuration; 120 | } else if (!segmentWords[i]) { 121 | // untimed words are at end of segment 122 | untimedStart = interpolatedSegmentWords[interpolatedSegmentWords.length - 1].endTime; 123 | } 124 | 125 | interpolatedUntimedWords = untimedWords.map((word, index) => ({ 126 | ...word, 127 | startTime: untimedStart 128 | + relativeEstimatedWordTimings[index].startTime, 129 | endTime: untimedStart 130 | + relativeEstimatedWordTimings[index].startTime 131 | + relativeEstimatedWordTimings[index].duration, 132 | })); 133 | } else { 134 | // untimed words are in the middle of segment 135 | const untimedStart = interpolatedSegmentWords[ 136 | interpolatedSegmentWords.length - 1 137 | ].endTime; 138 | const untimedEnd = segmentWords[i].startTime; 139 | const untimedDuration = untimedEnd - untimedStart; 140 | 141 | const actualToEstimatedUntimedRatio = untimedDuration / totalEstimatedDuration; 142 | 143 | interpolatedUntimedWords = untimedWords.map((word, index) => ({ 144 | ...word, 145 | startTime: untimedStart + ( 146 | relativeEstimatedWordTimings[index].startTime * actualToEstimatedUntimedRatio 147 | ), 148 | endTime: untimedStart + ( 149 | ( 150 | relativeEstimatedWordTimings[index].startTime 151 | + relativeEstimatedWordTimings[index].duration 152 | ) * actualToEstimatedUntimedRatio 153 | ), 154 | })); 155 | } 156 | } 157 | 158 | interpolatedSegmentWords.push(...interpolatedUntimedWords); 159 | } 160 | 161 | if (segmentWords[i]) { 162 | interpolatedSegmentWords.push(segmentWords[i]); 163 | } 164 | } 165 | 166 | return interpolatedSegmentWords; 167 | }; 168 | 169 | class GentleAdapter { 170 | static parse(gentle) { 171 | const segments = getSegments(gentle.transcript).map(segment => 172 | ({ ...segment, words: getWords(segment.text) })); 173 | 174 | gentle.words.forEach((gentleWord) => { 175 | const segment = segments.find(s => 176 | s.startIndex <= gentleWord.startOffset && s.endIndex > gentleWord.endOffset); 177 | 178 | const word = segment.words.find(w => 179 | segment.startIndex + w.startIndex <= gentleWord.startOffset 180 | && segment.startIndex + w.endIndex >= gentleWord.endOffset); 181 | 182 | word.startTime = gentleWord.start; 183 | word.endTime = gentleWord.end; 184 | }); 185 | 186 | const wordDurationEquation = getWordDurationEquation(gentle.words); 187 | 188 | const segmentsWithInterpolatedWords = segments.map(segment => 189 | ({ ...segment, words: interpolateSegmentWordTimings(segment.words, wordDurationEquation) })); 190 | 191 | const speakers = new Immutable.List([ 192 | new Speaker(), 193 | ]); 194 | 195 | const transcriptSegments = new Immutable.List(segmentsWithInterpolatedWords 196 | // discard any segments without any timings 197 | .filter(segment => segment.words[0].startTime) 198 | .map(segment => new TranscriptSegment({ 199 | speaker: 0, 200 | words: new Immutable.List(segment.words.map(word => new TranscriptWord({ 201 | start: word.startTime, 202 | end: word.endTime, 203 | text: word.text, 204 | }))), 205 | }))); 206 | 207 | return new Transcript({ 208 | speakers, 209 | segments: transcriptSegments, 210 | }); 211 | } 212 | } 213 | 214 | export default GentleAdapter; 215 | -------------------------------------------------------------------------------- /src/adapters/KaldiAdapter.js: -------------------------------------------------------------------------------- 1 | import Immutable from 'immutable'; 2 | 3 | import Speaker from '../Speaker'; 4 | import TranscriptSegment from '../TranscriptSegment'; 5 | import TranscriptWord from '../TranscriptWord'; 6 | import Transcript from '../Transcript'; 7 | 8 | class KaldiAdapter { 9 | static parse(transcriptJson, segmentsJson) { 10 | const speakerIdMap = {}; 11 | const speakers = []; 12 | 13 | const words = transcriptJson.words.reduce((currentWords, word) => { 14 | let segmentIndex = segmentsJson.segments.findIndex(segment => 15 | word.start >= segment.start && word.end < segment.start + segment.duration); 16 | 17 | if (segmentIndex === -1) { 18 | if (currentWords[currentWords.length - 1]) { 19 | ({ segmentIndex } = currentWords[currentWords.length - 1]); 20 | } else { 21 | segmentIndex = 0; 22 | } 23 | } 24 | 25 | return [...currentWords, { ...word, segmentIndex }]; 26 | }, []); 27 | 28 | const segments = new Immutable.List(segmentsJson.segments.reduce( 29 | (list, segment, segmentIndex) => { 30 | const segmentWords = words.filter(word => word.segmentIndex === segmentIndex); 31 | 32 | if (segmentWords.length === 0) { 33 | return list; 34 | } 35 | 36 | if (!speakerIdMap[segment.speaker['@id']]) { 37 | speakerIdMap[segment.speaker['@id']] = speakers.push(new Speaker({ name: null })) - 1; 38 | } 39 | 40 | return [ 41 | ...list, 42 | new TranscriptSegment({ 43 | speaker: speakerIdMap[segment.speaker['@id']], 44 | words: new Immutable.List(segmentWords.map(w => 45 | new TranscriptWord({ 46 | text: w.punct, 47 | start: w.start, 48 | end: w.end, 49 | }))), 50 | }), 51 | ]; 52 | }, 53 | [], 54 | )); 55 | 56 | return new Transcript({ speakers: new Immutable.List(speakers), segments }); 57 | } 58 | } 59 | 60 | export default KaldiAdapter; 61 | -------------------------------------------------------------------------------- /src/adapters/MediaTaggerAdapter.js: -------------------------------------------------------------------------------- 1 | import KaldiAdapter from './KaldiAdapter'; 2 | 3 | class MediaTaggerAdapter { 4 | static parse(json) { 5 | const { commaSegments: { transcription, segmentation } } = json; 6 | 7 | return KaldiAdapter.parse(transcription, segmentation); 8 | } 9 | } 10 | 11 | export default MediaTaggerAdapter; 12 | -------------------------------------------------------------------------------- /src/adapters/OctoAdapter.js: -------------------------------------------------------------------------------- 1 | import KaldiAdapter from './KaldiAdapter'; 2 | 3 | class OctoAdapter { 4 | static parse(json) { 5 | const { transcription, segmentation } = json; 6 | 7 | return KaldiAdapter.parse(transcription, segmentation); 8 | } 9 | } 10 | 11 | export default OctoAdapter; 12 | -------------------------------------------------------------------------------- /src/adapters/__tests__/GentleAdapter.test.js: -------------------------------------------------------------------------------- 1 | import GentleAdapter, { 2 | getSegments, 3 | getWords, 4 | interpolateSegmentWordTimings, 5 | stripPunctuation, 6 | getWordDurationEquation, 7 | getEstimatedWordDuration, 8 | } from '../GentleAdapter'; 9 | 10 | const gentle = require('./fixtures/gentle-response.json'); 11 | 12 | describe('getSegments', () => { 13 | it('should return segments correctly', () => { 14 | const text = 15 | "Yuan Meng has all the usual baby panda credentials: he's furry, cute, completely irresistible. But he isn't any old baby panda, he's French.\r\n\r\nThe first ever panda born in France making his public debut. Climbing, exploring, cuddling with mum, putting on a real show.\r\n\r\nI'm going to welcome the people who come, our visitors, our fans and I'm going to introduce them to our adorable ball of fur, who's especially cute right now. It's a big moment, it's very moving.\r\n\r\nAnd come they did. Hundreds of them, queuing up for a glimpse of this, quote, adorable ball of fur who has a certain Gallic charm. The cub was born in August last year, his tiny sibling died a few hours after birth. For some this was an emotional experience.\r\n\r\n\"Is it touching?\" this woman asked. \"It's a joy, it's a joy, it really makes us happy, yes. You've made me cry.\"\r\n\r\n\"We absolutely wanted to be here\", said this woman, \"to discover this ball of fur. It's a little ball of happiness, of peace. There's also a lot of symbolism behind the panda. So we're happy to be here.\"\r\n\r\nYuan Meng and his parents are eventually due to return to China in the next few years. Hopefully by then he may have developed a slightly better sense of balance.\r\n\r\nTim Allman, BBC News."; 16 | 17 | const segments = getSegments(text); 18 | 19 | expect(segments).toEqual([ 20 | { 21 | startIndex: 0, 22 | endIndex: 140, 23 | text: 24 | "Yuan Meng has all the usual baby panda credentials: he's furry, cute, completely irresistible. But he isn't any old baby panda, he's French.", 25 | }, 26 | { 27 | startIndex: 144, 28 | endIndex: 268, 29 | text: 30 | 'The first ever panda born in France making his public debut. Climbing, exploring, cuddling with mum, putting on a real show.', 31 | }, 32 | { 33 | startIndex: 272, 34 | endIndex: 467, 35 | text: 36 | "I'm going to welcome the people who come, our visitors, our fans and I'm going to introduce them to our adorable ball of fur, who's especially cute right now. It's a big moment, it's very moving.", 37 | }, 38 | { 39 | startIndex: 471, 40 | endIndex: 729, 41 | text: 42 | 'And come they did. Hundreds of them, queuing up for a glimpse of this, quote, adorable ball of fur who has a certain Gallic charm. The cub was born in August last year, his tiny sibling died a few hours after birth. For some this was an emotional experience.', 43 | }, 44 | { 45 | startIndex: 733, 46 | endIndex: 845, 47 | text: 48 | '"Is it touching?" this woman asked. "It\'s a joy, it\'s a joy, it really makes us happy, yes. You\'ve made me cry."', 49 | }, 50 | { 51 | startIndex: 849, 52 | endIndex: 1052, 53 | text: 54 | '"We absolutely wanted to be here", said this woman, "to discover this ball of fur. It\'s a little ball of happiness, of peace. There\'s also a lot of symbolism behind the panda. So we\'re happy to be here."', 55 | }, 56 | { 57 | startIndex: 1056, 58 | endIndex: 1218, 59 | text: 60 | 'Yuan Meng and his parents are eventually due to return to China in the next few years. Hopefully by then he may have developed a slightly better sense of balance.', 61 | }, 62 | { 63 | startIndex: 1222, 64 | endIndex: 1243, 65 | text: 'Tim Allman, BBC News.', 66 | }, 67 | ]); 68 | }); 69 | }); 70 | 71 | describe('getWords', () => { 72 | it('should return words correctly', () => { 73 | const text = 74 | "Yuan Meng has all the usual baby panda credentials: he's furry, cute, completely irresistible. But he isn't any old baby panda, he's French."; 75 | 76 | const segments = getWords(text); 77 | 78 | expect(segments).toEqual([ 79 | { startIndex: 0, endIndex: 4, text: 'Yuan' }, 80 | { startIndex: 5, endIndex: 9, text: 'Meng' }, 81 | { startIndex: 10, endIndex: 13, text: 'has' }, 82 | { startIndex: 14, endIndex: 17, text: 'all' }, 83 | { startIndex: 18, endIndex: 21, text: 'the' }, 84 | { startIndex: 22, endIndex: 27, text: 'usual' }, 85 | { startIndex: 28, endIndex: 32, text: 'baby' }, 86 | { startIndex: 33, endIndex: 38, text: 'panda' }, 87 | { startIndex: 39, endIndex: 51, text: 'credentials:' }, 88 | { startIndex: 52, endIndex: 56, text: "he's" }, 89 | { startIndex: 57, endIndex: 63, text: 'furry,' }, 90 | { startIndex: 64, endIndex: 69, text: 'cute,' }, 91 | { startIndex: 70, endIndex: 80, text: 'completely' }, 92 | { startIndex: 81, endIndex: 94, text: 'irresistible.' }, 93 | { startIndex: 95, endIndex: 98, text: 'But' }, 94 | { startIndex: 99, endIndex: 101, text: 'he' }, 95 | { startIndex: 102, endIndex: 107, text: "isn't" }, 96 | { startIndex: 108, endIndex: 111, text: 'any' }, 97 | { startIndex: 112, endIndex: 115, text: 'old' }, 98 | { startIndex: 116, endIndex: 120, text: 'baby' }, 99 | { startIndex: 121, endIndex: 127, text: 'panda,' }, 100 | { startIndex: 128, endIndex: 132, text: "he's" }, 101 | { startIndex: 133, endIndex: 140, text: 'French.' }, 102 | ]); 103 | }); 104 | }); 105 | 106 | describe('interpolateSegmentWordTimings', () => { 107 | it('passes through segments with complete timing information correctly', () => { 108 | const segmentWords = [ 109 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 110 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 111 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 112 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 113 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 114 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 115 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 116 | { text: 'this', startTime: 79.02, endTime: 79.22999999999999 }, 117 | { text: 'woman,', startTime: 79.23, endTime: 79.51 }, 118 | { text: '"to', startTime: 79.76, endTime: 79.88000000000001 }, 119 | { text: 'discover', startTime: 79.88, endTime: 80.35 }, 120 | { text: 'this', startTime: 80.349999, endTime: 80.529999 }, 121 | { text: 'ball', startTime: 80.559999, endTime: 80.879999 }, 122 | { text: 'of', startTime: 80.88, endTime: 81 }, 123 | { text: 'fur.', startTime: 81.02, endTime: 81.50999999999999 }, 124 | { text: "It's", startTime: 81.969999, endTime: 82.139999 }, 125 | { text: 'a', startTime: 82.139999, endTime: 82.199999 }, 126 | { text: 'little', startTime: 82.2, endTime: 82.42 }, 127 | { text: 'ball', startTime: 82.42, endTime: 82.7 }, 128 | { text: 'of', startTime: 82.7, endTime: 82.82000000000001 }, 129 | { text: 'happiness."', startTime: 82.82, endTime: 83.38999999999999 }, 130 | ]; 131 | 132 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 133 | 134 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 135 | segmentWords, 136 | wordDurationEquation, 137 | ); 138 | 139 | expect(interpolatedSegmentWords).toEqual(segmentWords); 140 | }); 141 | 142 | it('interpolates single missing words in the middle of segments correctly', () => { 143 | const segmentWords = [ 144 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 145 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 146 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 147 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 148 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 149 | { text: 'here",' }, 150 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 151 | { text: 'this', startTime: 79.02, endTime: 79.22999999999999 }, 152 | { text: 'woman,', startTime: 79.23, endTime: 79.51 }, 153 | { text: '"to', startTime: 79.76, endTime: 79.88000000000001 }, 154 | { text: 'discover', startTime: 79.88, endTime: 80.35 }, 155 | { text: 'this', startTime: 80.349999, endTime: 80.529999 }, 156 | { text: 'ball', startTime: 80.559999, endTime: 80.879999 }, 157 | { text: 'of', startTime: 80.88, endTime: 81 }, 158 | { text: 'fur.', startTime: 81.02, endTime: 81.50999999999999 }, 159 | { text: "It's", startTime: 81.969999, endTime: 82.139999 }, 160 | { text: 'a', startTime: 82.139999, endTime: 82.199999 }, 161 | { text: 'little', startTime: 82.2, endTime: 82.42 }, 162 | { text: 'ball', startTime: 82.42, endTime: 82.7 }, 163 | { text: 'of', startTime: 82.7, endTime: 82.82000000000001 }, 164 | { text: 'happiness."', startTime: 82.82, endTime: 83.38999999999999 }, 165 | ]; 166 | 167 | const expectedSegmentWords = [ 168 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 169 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 170 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 171 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 172 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 173 | { text: 'here",', startTime: 78.6, endTime: 78.81 }, 174 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 175 | { text: 'this', startTime: 79.02, endTime: 79.22999999999999 }, 176 | { text: 'woman,', startTime: 79.23, endTime: 79.51 }, 177 | { text: '"to', startTime: 79.76, endTime: 79.88000000000001 }, 178 | { text: 'discover', startTime: 79.88, endTime: 80.35 }, 179 | { text: 'this', startTime: 80.349999, endTime: 80.529999 }, 180 | { text: 'ball', startTime: 80.559999, endTime: 80.879999 }, 181 | { text: 'of', startTime: 80.88, endTime: 81 }, 182 | { text: 'fur.', startTime: 81.02, endTime: 81.50999999999999 }, 183 | { text: "It's", startTime: 81.969999, endTime: 82.139999 }, 184 | { text: 'a', startTime: 82.139999, endTime: 82.199999 }, 185 | { text: 'little', startTime: 82.2, endTime: 82.42 }, 186 | { text: 'ball', startTime: 82.42, endTime: 82.7 }, 187 | { text: 'of', startTime: 82.7, endTime: 82.82000000000001 }, 188 | { text: 'happiness."', startTime: 82.82, endTime: 83.38999999999999 }, 189 | ]; 190 | 191 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 192 | 193 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 194 | segmentWords, 195 | wordDurationEquation, 196 | ); 197 | 198 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 199 | }); 200 | 201 | it('interpolates multiple consecutive missing words in the middle of segments correctly', () => { 202 | const segmentWords = [ 203 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 204 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 205 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 206 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 207 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 208 | { text: 'here",' }, 209 | { text: 'said' }, 210 | { text: 'this' }, 211 | { text: 'woman,' }, 212 | { text: '"to', startTime: 79.76, endTime: 79.88000000000001 }, 213 | { text: 'discover', startTime: 79.88, endTime: 80.35 }, 214 | { text: 'this', startTime: 80.349999, endTime: 80.529999 }, 215 | { text: 'ball', startTime: 80.559999, endTime: 80.879999 }, 216 | { text: 'of', startTime: 80.88, endTime: 81 }, 217 | { text: 'fur.', startTime: 81.02, endTime: 81.50999999999999 }, 218 | { text: "It's", startTime: 81.969999, endTime: 82.139999 }, 219 | { text: 'a', startTime: 82.139999, endTime: 82.199999 }, 220 | { text: 'little', startTime: 82.2, endTime: 82.42 }, 221 | { text: 'ball', startTime: 82.42, endTime: 82.7 }, 222 | { text: 'of', startTime: 82.7, endTime: 82.82000000000001 }, 223 | { text: 'happiness."', startTime: 82.82, endTime: 83.38999999999999 }, 224 | ]; 225 | 226 | const expectedSegmentWords = [ 227 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 228 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 229 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 230 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 231 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 232 | { text: 'here",', startTime: 78.6, endTime: 78.87619047619047 }, 233 | { text: 'said', startTime: 78.87619047619047, endTime: 79.15238095238095 }, 234 | { text: 'this', startTime: 79.15238095238095, endTime: 79.42857142857143 }, 235 | { text: 'woman,', startTime: 79.42857142857143, endTime: 79.76 }, 236 | { text: '"to', startTime: 79.76, endTime: 79.88000000000001 }, 237 | { text: 'discover', startTime: 79.88, endTime: 80.35 }, 238 | { text: 'this', startTime: 80.349999, endTime: 80.529999 }, 239 | { text: 'ball', startTime: 80.559999, endTime: 80.879999 }, 240 | { text: 'of', startTime: 80.88, endTime: 81 }, 241 | { text: 'fur.', startTime: 81.02, endTime: 81.50999999999999 }, 242 | { text: "It's", startTime: 81.969999, endTime: 82.139999 }, 243 | { text: 'a', startTime: 82.139999, endTime: 82.199999 }, 244 | { text: 'little', startTime: 82.2, endTime: 82.42 }, 245 | { text: 'ball', startTime: 82.42, endTime: 82.7 }, 246 | { text: 'of', startTime: 82.7, endTime: 82.82000000000001 }, 247 | { text: 'happiness."', startTime: 82.82, endTime: 83.38999999999999 }, 248 | ]; 249 | 250 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 251 | 252 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 253 | segmentWords, 254 | wordDurationEquation, 255 | ); 256 | 257 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 258 | }); 259 | 260 | it('interpolates single missing words at the start of segments correctly', () => { 261 | const segmentWords = [ 262 | { text: '"We' }, 263 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 264 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 265 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 266 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 267 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 268 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 269 | ]; 270 | 271 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 272 | 273 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 274 | segmentWords, 275 | wordDurationEquation, 276 | ); 277 | 278 | const expectedSegmentWords = [ 279 | { text: '"We', startTime: 77.1, endTime: 77.28 }, 280 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 281 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 282 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 283 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 284 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 285 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 286 | ]; 287 | 288 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 289 | }); 290 | 291 | it('interpolates multiple missing words at the start of segments correctly', () => { 292 | const segmentWords = [ 293 | { text: '"We' }, 294 | { text: 'absolutely' }, 295 | { text: 'wanted' }, 296 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 297 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 298 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 299 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 300 | ]; 301 | 302 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 303 | 304 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 305 | segmentWords, 306 | wordDurationEquation, 307 | ); 308 | 309 | const expectedSegmentWords = [ 310 | { text: '"We', startTime: 77, endTime: 77.18 }, 311 | { text: 'absolutely', startTime: 77.18, endTime: 77.84 }, 312 | { text: 'wanted', startTime: 77.84, endTime: 78.26 }, 313 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 314 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 315 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 316 | { text: 'said', startTime: 78.81, endTime: 79.02 }, 317 | ]; 318 | 319 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 320 | }); 321 | 322 | it('interpolates single missing words at the end of segments correctly', () => { 323 | const segmentWords = [ 324 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 325 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 326 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 327 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 328 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 329 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 330 | { text: 'said' }, 331 | ]; 332 | 333 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 334 | 335 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 336 | segmentWords, 337 | wordDurationEquation, 338 | ); 339 | 340 | const expectedSegmentWords = [ 341 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 342 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 343 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 344 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 345 | { text: 'be', startTime: 78.39, endTime: 78.6 }, 346 | { text: 'here",', startTime: 78.65, endTime: 78.81 }, 347 | { text: 'said', startTime: 78.81, endTime: 79.11 }, 348 | ]; 349 | 350 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 351 | }); 352 | 353 | it('interpolates multiple missing words at the end of segments correctly', () => { 354 | const segmentWords = [ 355 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 356 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 357 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 358 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 359 | { text: 'be' }, 360 | { text: 'here",' }, 361 | { text: 'said' }, 362 | ]; 363 | 364 | const wordDurationEquation = { intercept: 0.06, gradient: 0.06 }; 365 | 366 | const interpolatedSegmentWords = interpolateSegmentWordTimings( 367 | segmentWords, 368 | wordDurationEquation, 369 | ); 370 | 371 | const expectedSegmentWords = [ 372 | { text: '"We', startTime: 77.11, endTime: 77.28 }, 373 | { text: 'absolutely', startTime: 77.28, endTime: 77.93 }, 374 | { text: 'wanted', startTime: 77.93, endTime: 77.98 }, 375 | { text: 'to', startTime: 78.26, endTime: 78.37 }, 376 | { text: 'be', startTime: 78.37, endTime: 78.55000000000001 }, 377 | { text: 'here",', startTime: 78.55000000000001, endTime: 78.85000000000001 }, 378 | { text: 'said', startTime: 78.85000000000001, endTime: 79.15 }, 379 | ]; 380 | 381 | expect(interpolatedSegmentWords).toEqual(expectedSegmentWords); 382 | }); 383 | 384 | it('handles segments with no timed words correctly', () => { 385 | const segmentWords = [ 386 | { text: '"We' }, 387 | { text: 'absolutely' }, 388 | { text: 'wanted' }, 389 | { text: 'to' }, 390 | { text: 'be' }, 391 | { text: 'here",' }, 392 | { text: 'said' }, 393 | { text: 'this' }, 394 | { text: 'woman.' }, 395 | ]; 396 | 397 | const interpolatedSegmentWords = interpolateSegmentWordTimings(segmentWords); 398 | 399 | expect(interpolatedSegmentWords).toEqual(segmentWords); 400 | }); 401 | }); 402 | 403 | describe('stripPunctuation', () => { 404 | it('strips punctuation correctly', () => { 405 | expect(stripPunctuation('"isn\'t."')).toEqual('isnt'); 406 | expect(stripPunctuation('hello!')).toEqual('hello'); 407 | expect(stripPunctuation('G20')).toEqual('G20'); 408 | expect(stripPunctuation('alex')).toEqual('alex'); 409 | }); 410 | }); 411 | 412 | describe('getWordDurationEquation', () => { 413 | it('calculates word duration equation coefficients correctly', () => { 414 | const { intercept, gradient } = getWordDurationEquation(gentle.words); 415 | 416 | expect(intercept).toBe(0.05564764212068429); 417 | expect(gradient).toBe(0.060176066257253684); 418 | }); 419 | }); 420 | 421 | describe('getEstimatedWordDuration', () => { 422 | it('calculates estimated word duration correctly', () => { 423 | const equation = { intercept: 0.5, gradient: 0.5 }; 424 | 425 | expect(getEstimatedWordDuration(1, equation)).toBe(1); 426 | expect(getEstimatedWordDuration(3, equation)).toBe(2); 427 | expect(getEstimatedWordDuration(6, equation)).toBe(3.5); 428 | }); 429 | }); 430 | 431 | describe('GentleAdapter', () => { 432 | describe('parse', () => { 433 | it('should return a Transcript correctly', () => { 434 | const transcript = GentleAdapter.parse(gentle); 435 | 436 | expect(transcript.segments.size).toBe(7); 437 | 438 | transcript.segments.forEach((segment) => { 439 | segment.words.forEach((word) => { 440 | expect(word.start).toBeDefined(); 441 | expect(word.end).toBeDefined(); 442 | }); 443 | }); 444 | }); 445 | }); 446 | }); 447 | -------------------------------------------------------------------------------- /src/adapters/__tests__/KaldiAdapter.test.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable global-require */ 2 | 3 | import KaldiAdapter from '../KaldiAdapter'; 4 | 5 | describe('MediaTaggerAdapter', () => { 6 | it('parses Media Tagger transcripts correctly', () => { 7 | const transcriptionJson = require('./fixtures/kaldi-1-transcription.json'); 8 | const segmentationJson = require('./fixtures/kaldi-1-segmentation.json'); 9 | 10 | const expectedTranscriptJson = require('./fixtures/kaldi-1-expected-transcript.json'); 11 | 12 | const transcript = KaldiAdapter.parse(transcriptionJson, segmentationJson); 13 | 14 | expect(transcript.toJson()).toEqual(expectedTranscriptJson); 15 | }); 16 | 17 | it('assigns words that occur outside of segments to the previous segment', () => { 18 | const transcriptionJson = require('./fixtures/kaldi-2-transcription.json'); 19 | const segmentationJson = require('./fixtures/kaldi-2-segmentation.json'); 20 | 21 | const transcript = KaldiAdapter.parse(transcriptionJson, segmentationJson); 22 | 23 | const text = transcript.segments.map(segment => segment.words.map(word => word.text).join(' ')).join(' '); 24 | 25 | expect(text).toEqual(transcriptionJson.punct); 26 | }); 27 | }); 28 | -------------------------------------------------------------------------------- /src/adapters/__tests__/fixtures/kaldi-1-expected-transcript.json: -------------------------------------------------------------------------------- 1 | { 2 | "speakers": [ 3 | { 4 | "name": null 5 | }, 6 | { 7 | "name": null 8 | }, 9 | { 10 | "name": null 11 | } 12 | ], 13 | "segments": [ 14 | { 15 | "words": [ 16 | { 17 | "text": "Right,", 18 | "start": 13.1, 19 | "end": 13.58 20 | }, 21 | { 22 | "text": "then.", 23 | "start": 13.62, 24 | "end": 13.91 25 | }, 26 | { 27 | "text": "Are", 28 | "start": 14.09, 29 | "end": 14.72 30 | }, 31 | { 32 | "text": "you", 33 | "start": 15.04, 34 | "end": 15.33 35 | }, 36 | { 37 | "text": "off", 38 | "start": 15.34, 39 | "end": 15.66 40 | }, 41 | { 42 | "text": "or", 43 | "start": 16.03, 44 | "end": 17.86 45 | }, 46 | { 47 | "text": "I'll", 48 | "start": 21.22, 49 | "end": 21.69 50 | }, 51 | { 52 | "text": "be", 53 | "start": 22.39, 54 | "end": 22.76 55 | }, 56 | { 57 | "text": "o.k.", 58 | "start": 23.6, 59 | "end": 23.95 60 | } 61 | ], 62 | "speaker": 0 63 | }, 64 | { 65 | "words": [ 66 | { 67 | "text": "Thank", 68 | "start": 38.16, 69 | "end": 38.44 70 | }, 71 | { 72 | "text": "you", 73 | "start": 38.44, 74 | "end": 38.56 75 | }, 76 | { 77 | "text": "very", 78 | "start": 38.56, 79 | "end": 38.82 80 | }, 81 | { 82 | "text": "much.", 83 | "start": 38.82, 84 | "end": 39.12 85 | }, 86 | { 87 | "text": "Can", 88 | "start": 39.15, 89 | "end": 39.32 90 | }, 91 | { 92 | "text": "I", 93 | "start": 39.32, 94 | "end": 39.41 95 | }, 96 | { 97 | "text": "just", 98 | "start": 39.41, 99 | "end": 39.67 100 | }, 101 | { 102 | "text": "say", 103 | "start": 39.67, 104 | "end": 39.94 105 | }, 106 | { 107 | "text": "this", 108 | "start": 39.95, 109 | "end": 40.39 110 | }, 111 | { 112 | "text": "first", 113 | "start": 40.58, 114 | "end": 40.91 115 | }, 116 | { 117 | "text": "of", 118 | "start": 40.91, 119 | "end": 41 120 | }, 121 | { 122 | "text": "all.", 123 | "start": 41, 124 | "end": 41.31 125 | }, 126 | { 127 | "text": "Thank", 128 | "start": 41.39, 129 | "end": 41.7 130 | }, 131 | { 132 | "text": "you", 133 | "start": 41.7, 134 | "end": 41.85 135 | }, 136 | { 137 | "text": "all", 138 | "start": 41.85, 139 | "end": 42.01 140 | }, 141 | { 142 | "text": "for", 143 | "start": 42.01, 144 | "end": 42.12 145 | }, 146 | { 147 | "text": "coming", 148 | "start": 42.12, 149 | "end": 42.45 150 | }, 151 | { 152 | "text": "here", 153 | "start": 42.45, 154 | "end": 42.83 155 | }, 156 | { 157 | "text": "today.", 158 | "start": 43.01, 159 | "end": 43.59 160 | } 161 | ], 162 | "speaker": 1 163 | }, 164 | { 165 | "words": [ 166 | { 167 | "text": "We", 168 | "start": 44.11, 169 | "end": 44.28 170 | }, 171 | { 172 | "text": "just", 173 | "start": 44.3, 174 | "end": 44.6 175 | }, 176 | { 177 | "text": "concluded", 178 | "start": 44.6, 179 | "end": 45.21 180 | }, 181 | { 182 | "text": "a", 183 | "start": 45.21, 184 | "end": 45.37 185 | }, 186 | { 187 | "text": "meeting", 188 | "start": 45.37, 189 | "end": 45.92 190 | }, 191 | { 192 | "text": "a", 193 | "start": 45.92, 194 | "end": 46 195 | }, 196 | { 197 | "text": "joint", 198 | "start": 46, 199 | "end": 46.33 200 | }, 201 | { 202 | "text": "meeting", 203 | "start": 46.33, 204 | "end": 46.69 205 | }, 206 | { 207 | "text": "of", 208 | "start": 46.69, 209 | "end": 46.79 210 | }, 211 | { 212 | "text": "the", 213 | "start": 46.79, 214 | "end": 46.88 215 | }, 216 | { 217 | "text": "shadow", 218 | "start": 46.88, 219 | "end": 47.2 220 | }, 221 | { 222 | "text": "cabinet", 223 | "start": 47.2, 224 | "end": 47.69 225 | }, 226 | { 227 | "text": "and", 228 | "start": 47.69, 229 | "end": 47.82 230 | }, 231 | { 232 | "text": "the", 233 | "start": 47.82, 234 | "end": 47.9 235 | }, 236 | { 237 | "text": "National", 238 | "start": 47.9, 239 | "end": 48.26 240 | }, 241 | { 242 | "text": "Executive", 243 | "start": 48.26, 244 | "end": 49.07 245 | }, 246 | { 247 | "text": "and", 248 | "start": 49.69, 249 | "end": 50.21 250 | }, 251 | { 252 | "text": "discuss", 253 | "start": 50.61, 254 | "end": 51.32 255 | }, 256 | { 257 | "text": "a", 258 | "start": 51.69, 259 | "end": 51.88 260 | }, 261 | { 262 | "text": "manifesto", 263 | "start": 51.89, 264 | "end": 52.6 265 | }, 266 | { 267 | "text": "for", 268 | "start": 52.6, 269 | "end": 52.7 270 | }, 271 | { 272 | "text": "the", 273 | "start": 52.7, 274 | "end": 52.82 275 | }, 276 | { 277 | "text": "general", 278 | "start": 52.82, 279 | "end": 53.19 280 | }, 281 | { 282 | "text": "election.", 283 | "start": 53.19, 284 | "end": 53.7 285 | }, 286 | { 287 | "text": "We", 288 | "start": 54.04, 289 | "end": 54.15 290 | }, 291 | { 292 | "text": "just", 293 | "start": 54.29, 294 | "end": 54.7 295 | }, 296 | { 297 | "text": "unanimously", 298 | "start": 54.79, 299 | "end": 55.77 300 | }, 301 | { 302 | "text": "agreed", 303 | "start": 55.77, 304 | "end": 56.36 305 | }, 306 | { 307 | "text": "the", 308 | "start": 56.53, 309 | "end": 56.61 310 | }, 311 | { 312 | "text": "contents", 313 | "start": 56.63, 314 | "end": 57.25 315 | }, 316 | { 317 | "text": "of", 318 | "start": 57.28, 319 | "end": 57.49 320 | }, 321 | { 322 | "text": "it.", 323 | "start": 57.49, 324 | "end": 57.76 325 | } 326 | ], 327 | "speaker": 1 328 | }, 329 | { 330 | "words": [ 331 | { 332 | "text": "We've", 333 | "start": 58.34, 334 | "end": 58.73 335 | }, 336 | { 337 | "text": "mended.", 338 | "start": 59.08, 339 | "end": 59.72 340 | }, 341 | { 342 | "text": "Draft", 343 | "start": 59.95, 344 | "end": 60.26 345 | }, 346 | { 347 | "text": "document", 348 | "start": 60.36, 349 | "end": 60.82 350 | }, 351 | { 352 | "text": "was", 353 | "start": 60.84, 354 | "end": 60.99 355 | }, 356 | { 357 | "text": "put", 358 | "start": 60.99, 359 | "end": 61.2 360 | }, 361 | { 362 | "text": "forward", 363 | "start": 61.2, 364 | "end": 61.69 365 | }, 366 | { 367 | "text": "in", 368 | "start": 61.88, 369 | "end": 62.06 370 | }, 371 | { 372 | "text": "the", 373 | "start": 62.06, 374 | "end": 62.17 375 | }, 376 | { 377 | "text": "most", 378 | "start": 62.17, 379 | "end": 62.76 380 | }, 381 | { 382 | "text": "informed.", 383 | "start": 63.43, 384 | "end": 64.38 385 | } 386 | ], 387 | "speaker": 1 388 | }, 389 | { 390 | "words": [ 391 | { 392 | "text": "Interesting", 393 | "start": 64.77, 394 | "end": 65.62 395 | }, 396 | { 397 | "text": "sensible", 398 | "start": 65.91, 399 | "end": 66.75 400 | }, 401 | { 402 | "text": "discussion", 403 | "start": 66.88, 404 | "end": 67.43 405 | }, 406 | { 407 | "text": "and", 408 | "start": 67.43, 409 | "end": 67.51 410 | }, 411 | { 412 | "text": "debate", 413 | "start": 67.51, 414 | "end": 67.84 415 | } 416 | ], 417 | "speaker": 1 418 | }, 419 | { 420 | "words": [ 421 | { 422 | "text": "in", 423 | "start": 68.45, 424 | "end": 68.72 425 | }, 426 | { 427 | "text": "a", 428 | "start": 68.75, 429 | "end": 68.91 430 | }, 431 | { 432 | "text": "party", 433 | "start": 68.91, 434 | "end": 69.48 435 | }, 436 | { 437 | "text": "and", 438 | "start": 69.94, 439 | "end": 70.2 440 | }, 441 | { 442 | "text": "will", 443 | "start": 70.24, 444 | "end": 70.44 445 | }, 446 | { 447 | "text": "present", 448 | "start": 70.43, 449 | "end": 70.84 450 | }, 451 | { 452 | "text": "his", 453 | "start": 70.85, 454 | "end": 71 455 | }, 456 | { 457 | "text": "manifesto.", 458 | "start": 71.02, 459 | "end": 71.82 460 | }, 461 | { 462 | "text": "British", 463 | "start": 72.21, 464 | "end": 72.56 465 | }, 466 | { 467 | "text": "people", 468 | "start": 72.56, 469 | "end": 73.08 470 | }, 471 | { 472 | "text": "in", 473 | "start": 73.26, 474 | "end": 73.39 475 | }, 476 | { 477 | "text": "the", 478 | "start": 73.39, 479 | "end": 73.46 480 | }, 481 | { 482 | "text": "next", 483 | "start": 73.46, 484 | "end": 73.71 485 | }, 486 | { 487 | "text": "few", 488 | "start": 73.71, 489 | "end": 73.87 490 | }, 491 | { 492 | "text": "days", 493 | "start": 73.87, 494 | "end": 74.4 495 | }, 496 | { 497 | "text": "will", 498 | "start": 75.99, 499 | "end": 76.16 500 | }, 501 | { 502 | "text": "be", 503 | "start": 76.16, 504 | "end": 76.28 505 | }, 506 | { 507 | "text": "an", 508 | "start": 76.28, 509 | "end": 76.38 510 | }, 511 | { 512 | "text": "offer.", 513 | "start": 76.38, 514 | "end": 76.8 515 | }, 516 | { 517 | "text": "We", 518 | "start": 76.95, 519 | "end": 77.23 520 | }, 521 | { 522 | "text": "believe", 523 | "start": 77.23, 524 | "end": 77.45 525 | }, 526 | { 527 | "text": "the", 528 | "start": 77.54, 529 | "end": 77.7 530 | }, 531 | { 532 | "text": "policies", 533 | "start": 77.89, 534 | "end": 78.41 535 | }, 536 | { 537 | "text": "in", 538 | "start": 78.41, 539 | "end": 78.53 540 | }, 541 | { 542 | "text": "it", 543 | "start": 78.52, 544 | "end": 78.68 545 | }, 546 | { 547 | "text": "are", 548 | "start": 78.86, 549 | "end": 78.99 550 | }, 551 | { 552 | "text": "very", 553 | "start": 78.99, 554 | "end": 79.26 555 | }, 556 | { 557 | "text": "popular", 558 | "start": 79.26, 559 | "end": 79.83 560 | } 561 | ], 562 | "speaker": 1 563 | }, 564 | { 565 | "words": [ 566 | { 567 | "text": "an", 568 | "start": 80.32, 569 | "end": 80.45 570 | }, 571 | { 572 | "text": "offer", 573 | "start": 80.46, 574 | "end": 80.91 575 | }, 576 | { 577 | "text": "that", 578 | "start": 81.02, 579 | "end": 81.1 580 | }, 581 | { 582 | "text": "will", 583 | "start": 81.17, 584 | "end": 81.35 585 | }, 586 | { 587 | "text": "transform", 588 | "start": 81.35, 589 | "end": 82 590 | }, 591 | { 592 | "text": "the", 593 | "start": 82, 594 | "end": 82.1 595 | }, 596 | { 597 | "text": "lives", 598 | "start": 82.1, 599 | "end": 82.68 600 | }, 601 | { 602 | "text": "of", 603 | "start": 82.82, 604 | "end": 82.97 605 | }, 606 | { 607 | "text": "many", 608 | "start": 82.97, 609 | "end": 83.21 610 | }, 611 | { 612 | "text": "people", 613 | "start": 83.21, 614 | "end": 83.69 615 | }, 616 | { 617 | "text": "in", 618 | "start": 83.81, 619 | "end": 83.93 620 | }, 621 | { 622 | "text": "our", 623 | "start": 83.93, 624 | "end": 84.08 625 | }, 626 | { 627 | "text": "society", 628 | "start": 84.08, 629 | "end": 84.84 630 | }, 631 | { 632 | "text": "and", 633 | "start": 85.18, 634 | "end": 85.42 635 | }, 636 | { 637 | "text": "ensure", 638 | "start": 85.43, 639 | "end": 86.06 640 | }, 641 | { 642 | "text": "we", 643 | "start": 86.43, 644 | "end": 86.67 645 | }, 646 | { 647 | "text": "have", 648 | "start": 86.67, 649 | "end": 86.79 650 | }, 651 | { 652 | "text": "a", 653 | "start": 86.79, 654 | "end": 86.87 655 | }, 656 | { 657 | "text": "government", 658 | "start": 86.87, 659 | "end": 87.33 660 | }, 661 | { 662 | "text": "in", 663 | "start": 87.33, 664 | "end": 87.47 665 | }, 666 | { 667 | "text": "Britain.", 668 | "start": 87.47, 669 | "end": 87.95 670 | }, 671 | { 672 | "text": "On", 673 | "start": 88.38, 674 | "end": 88.62 675 | }, 676 | { 677 | "text": "June,", 678 | "start": 88.62, 679 | "end": 88.85 680 | }, 681 | { 682 | "text": "the", 683 | "start": 88.85, 684 | "end": 88.99 685 | }, 686 | { 687 | "text": "eighth.", 688 | "start": 88.99, 689 | "end": 89.45 690 | } 691 | ], 692 | "speaker": 1 693 | }, 694 | { 695 | "words": [ 696 | { 697 | "text": "That", 698 | "start": 89.82, 699 | "end": 90.07 700 | }, 701 | { 702 | "text": "will", 703 | "start": 90.07, 704 | "end": 90.37 705 | }, 706 | { 707 | "text": "work", 708 | "start": 90.47, 709 | "end": 90.8 710 | }, 711 | { 712 | "text": "for", 713 | "start": 90.8, 714 | "end": 90.92 715 | }, 716 | { 717 | "text": "the", 718 | "start": 90.92, 719 | "end": 91.03 720 | }, 721 | { 722 | "text": "many.", 723 | "start": 91.03, 724 | "end": 91.43 725 | }, 726 | { 727 | "text": "Not", 728 | "start": 91.58, 729 | "end": 91.86 730 | }, 731 | { 732 | "text": "the", 733 | "start": 91.86, 734 | "end": 91.94 735 | }, 736 | { 737 | "text": "few.", 738 | "start": 91.94, 739 | "end": 92.41 740 | }, 741 | { 742 | "text": "Give", 743 | "start": 92.83, 744 | "end": 93.05 745 | }, 746 | { 747 | "text": "everyone", 748 | "start": 93.05, 749 | "end": 93.61 750 | }, 751 | { 752 | "text": "in", 753 | "start": 93.78, 754 | "end": 93.9 755 | }, 756 | { 757 | "text": "our", 758 | "start": 93.92, 759 | "end": 94.07 760 | }, 761 | { 762 | "text": "society,", 763 | "start": 94.07, 764 | "end": 94.89 765 | }, 766 | { 767 | "text": "a", 768 | "start": 95.08, 769 | "end": 95.22 770 | }, 771 | { 772 | "text": "decent", 773 | "start": 95.23, 774 | "end": 95.66 775 | }, 776 | { 777 | "text": "opportunity", 778 | "start": 95.66, 779 | "end": 96.48 780 | }, 781 | { 782 | "text": "and", 783 | "start": 96.6, 784 | "end": 96.72 785 | }, 786 | { 787 | "text": "a", 788 | "start": 96.74, 789 | "end": 96.82 790 | }, 791 | { 792 | "text": "decent", 793 | "start": 96.82, 794 | "end": 97.24 795 | }, 796 | { 797 | "text": "chance.", 798 | "start": 97.24, 799 | "end": 97.8 800 | } 801 | ], 802 | "speaker": 1 803 | }, 804 | { 805 | "words": [ 806 | { 807 | "text": "So", 808 | "start": 98, 809 | "end": 98.17 810 | }, 811 | { 812 | "text": "nobody's", 813 | "start": 98.19, 814 | "end": 98.62 815 | }, 816 | { 817 | "text": "ignored,", 818 | "start": 98.64, 819 | "end": 99.18 820 | }, 821 | { 822 | "text": "nobody's", 823 | "start": 99.3, 824 | "end": 99.75 825 | }, 826 | { 827 | "text": "forgotten.", 828 | "start": 99.75, 829 | "end": 100.3 830 | }, 831 | { 832 | "text": "And", 833 | "start": 100.5, 834 | "end": 100.67 835 | }, 836 | { 837 | "text": "nobody", 838 | "start": 100.67, 839 | "end": 100.86 840 | }, 841 | { 842 | "text": "is", 843 | "start": 100.86, 844 | "end": 101.21 845 | }, 846 | { 847 | "text": "left", 848 | "start": 101.29, 849 | "end": 101.56 850 | }, 851 | { 852 | "text": "behind", 853 | "start": 101.56, 854 | "end": 102.11 855 | }, 856 | { 857 | "text": "the", 858 | "start": 102.49, 859 | "end": 102.6 860 | }, 861 | { 862 | "text": "details", 863 | "start": 102.61, 864 | "end": 103.4 865 | }, 866 | { 867 | "text": "will", 868 | "start": 103.55, 869 | "end": 103.7 870 | }, 871 | { 872 | "text": "be", 873 | "start": 103.7, 874 | "end": 103.82 875 | }, 876 | { 877 | "text": "published", 878 | "start": 103.82, 879 | "end": 104.49 880 | }, 881 | { 882 | "text": "in", 883 | "start": 104.63, 884 | "end": 104.76 885 | }, 886 | { 887 | "text": "the", 888 | "start": 104.76, 889 | "end": 104.83 890 | }, 891 | { 892 | "text": "next", 893 | "start": 104.83, 894 | "end": 105.08 895 | }, 896 | { 897 | "text": "few", 898 | "start": 105.08, 899 | "end": 105.25 900 | }, 901 | { 902 | "text": "days,", 903 | "start": 105.25, 904 | "end": 105.78 905 | }, 906 | { 907 | "text": "the", 908 | "start": 106.08, 909 | "end": 106.21 910 | }, 911 | { 912 | "text": "details", 913 | "start": 106.22, 914 | "end": 106.95 915 | }, 916 | { 917 | "text": "will", 918 | "start": 107.1, 919 | "end": 107.29 920 | }, 921 | { 922 | "text": "be", 923 | "start": 107.29, 924 | "end": 107.41 925 | }, 926 | { 927 | "text": "set", 928 | "start": 107.41, 929 | "end": 107.74 930 | }, 931 | { 932 | "text": "out", 933 | "start": 107.74, 934 | "end": 107.98 935 | }, 936 | { 937 | "text": "to", 938 | "start": 107.98, 939 | "end": 108.22 940 | }, 941 | { 942 | "text": "you,", 943 | "start": 108.22, 944 | "end": 108.49 945 | }, 946 | { 947 | "text": "including", 948 | "start": 108.63, 949 | "end": 109.41 950 | }, 951 | { 952 | "text": "the", 953 | "start": 109.7, 954 | "end": 109.79 955 | }, 956 | { 957 | "text": "costings", 958 | "start": 109.82, 959 | "end": 110.59 960 | }, 961 | { 962 | "text": "of", 963 | "start": 110.71, 964 | "end": 110.94 965 | }, 966 | { 967 | "text": "all", 968 | "start": 110.97, 969 | "end": 111.46 970 | }, 971 | { 972 | "text": "the", 973 | "start": 111.55, 974 | "end": 111.6 975 | }, 976 | { 977 | "text": "pledges", 978 | "start": 111.65, 979 | "end": 112.24 980 | }, 981 | { 982 | "text": "promises", 983 | "start": 112.44, 984 | "end": 113.05 985 | }, 986 | { 987 | "text": "we", 988 | "start": 113.24, 989 | "end": 113.42 990 | }, 991 | { 992 | "text": "make", 993 | "start": 113.42, 994 | "end": 113.75 995 | }, 996 | { 997 | "text": "and", 998 | "start": 114.01, 999 | "end": 114.14 1000 | }, 1001 | { 1002 | "text": "I", 1003 | "start": 114.17, 1004 | "end": 114.28 1005 | }, 1006 | { 1007 | "text": "know", 1008 | "start": 114.28, 1009 | "end": 114.76 1010 | }, 1011 | { 1012 | "text": "you're", 1013 | "start": 114.85, 1014 | "end": 115.06 1015 | }, 1016 | { 1017 | "text": "all", 1018 | "start": 115.06, 1019 | "end": 115.23 1020 | }, 1021 | { 1022 | "text": "looking", 1023 | "start": 115.23, 1024 | "end": 115.52 1025 | }, 1026 | { 1027 | "text": "forward", 1028 | "start": 115.52, 1029 | "end": 115.83 1030 | }, 1031 | { 1032 | "text": "to", 1033 | "start": 115.83, 1034 | "end": 115.95 1035 | }, 1036 | { 1037 | "text": "reading", 1038 | "start": 115.95, 1039 | "end": 116.32 1040 | }, 1041 | { 1042 | "text": "it", 1043 | "start": 116.32, 1044 | "end": 116.44 1045 | } 1046 | ], 1047 | "speaker": 1 1048 | }, 1049 | { 1050 | "words": [ 1051 | { 1052 | "text": "in", 1053 | "start": 116.57, 1054 | "end": 116.73 1055 | }, 1056 | { 1057 | "text": "great", 1058 | "start": 116.73, 1059 | "end": 117.05 1060 | }, 1061 | { 1062 | "text": "detail", 1063 | "start": 117.05, 1064 | "end": 117.63 1065 | }, 1066 | { 1067 | "text": "at", 1068 | "start": 117.73, 1069 | "end": 117.88 1070 | }, 1071 | { 1072 | "text": "that", 1073 | "start": 117.89, 1074 | "end": 118.16 1075 | }, 1076 | { 1077 | "text": "time", 1078 | "start": 118.16, 1079 | "end": 118.6 1080 | }, 1081 | { 1082 | "text": "at", 1083 | "start": 118.92, 1084 | "end": 119.12 1085 | }, 1086 | { 1087 | "text": "that", 1088 | "start": 119.17, 1089 | "end": 119.48 1090 | }, 1091 | { 1092 | "text": "point", 1093 | "start": 119.48, 1094 | "end": 119.78 1095 | }, 1096 | { 1097 | "text": "there", 1098 | "start": 119.78, 1099 | "end": 120.1 1100 | }, 1101 | { 1102 | "text": "at", 1103 | "start": 120.42, 1104 | "end": 120.6 1105 | }, 1106 | { 1107 | "text": "that", 1108 | "start": 120.64, 1109 | "end": 120.94 1110 | }, 1111 | { 1112 | "text": "point.", 1113 | "start": 120.94, 1114 | "end": 121.52 1115 | }, 1116 | { 1117 | "text": "You'll", 1118 | "start": 121.68, 1119 | "end": 121.92 1120 | }, 1121 | { 1122 | "text": "be", 1123 | "start": 121.96, 1124 | "end": 122.05 1125 | }, 1126 | { 1127 | "text": "able", 1128 | "start": 122.05, 1129 | "end": 122.23 1130 | }, 1131 | { 1132 | "text": "to", 1133 | "start": 122.23, 1134 | "end": 122.37 1135 | }, 1136 | { 1137 | "text": "ask", 1138 | "start": 122.37, 1139 | "end": 122.73 1140 | }, 1141 | { 1142 | "text": "all", 1143 | "start": 122.82, 1144 | "end": 123.09 1145 | }, 1146 | { 1147 | "text": "the", 1148 | "start": 123.09, 1149 | "end": 123.19 1150 | }, 1151 | { 1152 | "text": "questions", 1153 | "start": 123.19, 1154 | "end": 123.76 1155 | }, 1156 | { 1157 | "text": "you", 1158 | "start": 123.9, 1159 | "end": 124.06 1160 | }, 1161 | { 1162 | "text": "like", 1163 | "start": 124.06, 1164 | "end": 124.33 1165 | }, 1166 | { 1167 | "text": "that", 1168 | "start": 124.62, 1169 | "end": 124.8 1170 | }, 1171 | { 1172 | "text": "today.", 1173 | "start": 124.88, 1174 | "end": 125.46 1175 | } 1176 | ], 1177 | "speaker": 1 1178 | }, 1179 | { 1180 | "words": [ 1181 | { 1182 | "text": "Thank", 1183 | "start": 125.71, 1184 | "end": 125.97 1185 | }, 1186 | { 1187 | "text": "you", 1188 | "start": 125.97, 1189 | "end": 126.09 1190 | }, 1191 | { 1192 | "text": "all", 1193 | "start": 126.08, 1194 | "end": 126.22 1195 | }, 1196 | { 1197 | "text": "very", 1198 | "start": 126.52, 1199 | "end": 126.85 1200 | }, 1201 | { 1202 | "text": "much.", 1203 | "start": 126.85, 1204 | "end": 126.99 1205 | }, 1206 | { 1207 | "text": "Thank", 1208 | "start": 127.18, 1209 | "end": 127.48 1210 | }, 1211 | { 1212 | "text": "you", 1213 | "start": 127.48, 1214 | "end": 127.6 1215 | }, 1216 | { 1217 | "text": "all.", 1218 | "start": 127.6, 1219 | "end": 128.01 1220 | }, 1221 | { 1222 | "text": "Thank", 1223 | "start": 128.16, 1224 | "end": 128.43 1225 | }, 1226 | { 1227 | "text": "you", 1228 | "start": 128.43, 1229 | "end": 128.72 1230 | }, 1231 | { 1232 | "text": "all.", 1233 | "start": 128.72, 1234 | "end": 128.77 1235 | }, 1236 | { 1237 | "text": "Thank", 1238 | "start": 131.31, 1239 | "end": 131.61 1240 | }, 1241 | { 1242 | "text": "you", 1243 | "start": 131.61, 1244 | "end": 131.75 1245 | }, 1246 | { 1247 | "text": "all", 1248 | "start": 131.75, 1249 | "end": 132.13 1250 | }, 1251 | { 1252 | "text": "very", 1253 | "start": 132.27, 1254 | "end": 132.56 1255 | }, 1256 | { 1257 | "text": "much", 1258 | "start": 132.56, 1259 | "end": 132.94 1260 | }, 1261 | { 1262 | "text": "for", 1263 | "start": 133.03, 1264 | "end": 133.13 1265 | }, 1266 | { 1267 | "text": "coming", 1268 | "start": 133.16, 1269 | "end": 133.44 1270 | }, 1271 | { 1272 | "text": "today.", 1273 | "start": 133.44, 1274 | "end": 133.78 1275 | }, 1276 | { 1277 | "text": "The", 1278 | "start": 134.17, 1279 | "end": 136.1 1280 | } 1281 | ], 1282 | "speaker": 2 1283 | } 1284 | ] 1285 | } -------------------------------------------------------------------------------- /src/adapters/__tests__/fixtures/kaldi-1-segmentation.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "version": "0.0.8" 4 | }, 5 | "@type": "AudioFile", 6 | "speakers": [ 7 | { 8 | "@id": "S1", 9 | "gender": "F" 10 | }, 11 | { 12 | "@id": "S2", 13 | "gender": "M" 14 | }, 15 | { 16 | "@id": "S12", 17 | "gender": "M" 18 | }, 19 | { 20 | "@id": "S22", 21 | "gender": "M" 22 | }, 23 | { 24 | "@id": "S23", 25 | "gender": "F" 26 | } 27 | ], 28 | "segments": [ 29 | { 30 | "@type": "Segment", 31 | "start": 8.72, 32 | "duration": 2.25, 33 | "bandwidth": "S", 34 | "speaker": { 35 | "@id": "S1", 36 | "gender": "F" 37 | } 38 | }, 39 | { 40 | "@type": "Segment", 41 | "start": 12.43, 42 | "duration": 12.88, 43 | "bandwidth": "S", 44 | "speaker": { 45 | "@id": "S2", 46 | "gender": "M" 47 | } 48 | }, 49 | { 50 | "@type": "Segment", 51 | "start": 28.31, 52 | "duration": 2.66, 53 | "bandwidth": "S", 54 | "speaker": { 55 | "@id": "S2", 56 | "gender": "M" 57 | } 58 | }, 59 | { 60 | "@type": "Segment", 61 | "start": 37.89, 62 | "duration": 5.92, 63 | "bandwidth": "S", 64 | "speaker": { 65 | "@id": "S12", 66 | "gender": "M" 67 | } 68 | }, 69 | { 70 | "@type": "Segment", 71 | "start": 43.95, 72 | "duration": 13.98, 73 | "bandwidth": "S", 74 | "speaker": { 75 | "@id": "S12", 76 | "gender": "M" 77 | } 78 | }, 79 | { 80 | "@type": "Segment", 81 | "start": 57.93, 82 | "duration": 6.47, 83 | "bandwidth": "S", 84 | "speaker": { 85 | "@id": "S12", 86 | "gender": "M" 87 | } 88 | }, 89 | { 90 | "@type": "Segment", 91 | "start": 64.54, 92 | "duration": 3.31, 93 | "bandwidth": "S", 94 | "speaker": { 95 | "@id": "S12", 96 | "gender": "M" 97 | } 98 | }, 99 | { 100 | "@type": "Segment", 101 | "start": 67.99, 102 | "duration": 12.12, 103 | "bandwidth": "S", 104 | "speaker": { 105 | "@id": "S12", 106 | "gender": "M" 107 | } 108 | }, 109 | { 110 | "@type": "Segment", 111 | "start": 80.11, 112 | "duration": 9.32, 113 | "bandwidth": "S", 114 | "speaker": { 115 | "@id": "S12", 116 | "gender": "M" 117 | } 118 | }, 119 | { 120 | "@type": "Segment", 121 | "start": 89.58, 122 | "duration": 8.24, 123 | "bandwidth": "S", 124 | "speaker": { 125 | "@id": "S12", 126 | "gender": "M" 127 | } 128 | }, 129 | { 130 | "@type": "Segment", 131 | "start": 97.82, 132 | "duration": 18.68, 133 | "bandwidth": "S", 134 | "speaker": { 135 | "@id": "S12", 136 | "gender": "M" 137 | } 138 | }, 139 | { 140 | "@type": "Segment", 141 | "start": 116.5, 142 | "duration": 9.02, 143 | "bandwidth": "S", 144 | "speaker": { 145 | "@id": "S12", 146 | "gender": "M" 147 | } 148 | }, 149 | { 150 | "@type": "Segment", 151 | "start": 125.52, 152 | "duration": 11.99, 153 | "bandwidth": "S", 154 | "speaker": { 155 | "@id": "S22", 156 | "gender": "M" 157 | } 158 | }, 159 | { 160 | "@type": "Segment", 161 | "start": 138.62, 162 | "duration": 3.16, 163 | "bandwidth": "S", 164 | "speaker": { 165 | "@id": "S23", 166 | "gender": "F" 167 | } 168 | } 169 | ] 170 | } -------------------------------------------------------------------------------- /src/adapters/__tests__/fixtures/kaldi-1-transcription.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "version": "0.0.8" 4 | }, 5 | "text": 6 | "right then are you off or i'll be o.k. thank you very much can i just say this first of all thank you all for coming here today we just concluded a meeting a joint meeting of the shadow cabinet and the national executive and discuss a manifesto for the general election we just unanimously agreed the contents of it we've mended draft document was put forward in the most informed interesting sensible discussion and debate in a party and will present his manifesto british people in the next few days will be an offer we believe the policies in it are very popular an offer that will transform the lives of many people in our society and ensure we have a government in britain on june the eighth that will work for the many not the few give everyone in our society a decent opportunity and a decent chance so nobody's ignored nobody's forgotten and nobody is left behind the details will be published in the next few days the details will be set out to you including the costings of all the pledges promises we make and i know you're all looking forward to reading it in great detail at that time at that point there at that point you'll be able to ask all the questions you like that today thank you all very much thank you all thank you all thank you all very much for coming today the", 7 | "punct": 8 | "Right, then. Are you off or I'll be o.k. Thank you very much. Can I just say this first of all. Thank you all for coming here today. We just concluded a meeting a joint meeting of the shadow cabinet and the National Executive and discuss a manifesto for the general election. We just unanimously agreed the contents of it. We've mended. Draft document was put forward in the most informed. Interesting sensible discussion and debate in a party and will present his manifesto. British people in the next few days will be an offer. We believe the policies in it are very popular an offer that will transform the lives of many people in our society and ensure we have a government in Britain. On June, the eighth. That will work for the many. Not the few. Give everyone in our society, a decent opportunity and a decent chance. So nobody's ignored, nobody's forgotten. And nobody is left behind the details will be published in the next few days, the details will be set out to you, including the costings of all the pledges promises we make and I know you're all looking forward to reading it in great detail at that time at that point there at that point. You'll be able to ask all the questions you like that today. Thank you all very much. Thank you all. Thank you all. Thank you all very much for coming today. The", 9 | "words": [ 10 | { 11 | "start": 13.1, 12 | "confidence": 0.94, 13 | "end": 13.58, 14 | "word": "right", 15 | "punct": "Right," 16 | }, 17 | { 18 | "start": 13.62, 19 | "confidence": 0.42, 20 | "end": 13.91, 21 | "word": "then", 22 | "punct": "then." 23 | }, 24 | { 25 | "start": 14.09, 26 | "confidence": 0.52, 27 | "end": 14.72, 28 | "word": "are", 29 | "punct": "Are" 30 | }, 31 | { 32 | "start": 15.04, 33 | "confidence": 0.64, 34 | "end": 15.33, 35 | "word": "you", 36 | "punct": "you" 37 | }, 38 | { 39 | "start": 15.34, 40 | "confidence": 0.63, 41 | "end": 15.66, 42 | "word": "off", 43 | "punct": "off" 44 | }, 45 | { 46 | "start": 16.03, 47 | "confidence": 0.51, 48 | "end": 17.86, 49 | "word": "or", 50 | "punct": "or" 51 | }, 52 | { 53 | "start": 21.22, 54 | "confidence": 0.47, 55 | "end": 21.69, 56 | "word": "i'll", 57 | "punct": "I'll" 58 | }, 59 | { 60 | "start": 22.39, 61 | "confidence": 0.43, 62 | "end": 22.76, 63 | "word": "be", 64 | "punct": "be" 65 | }, 66 | { 67 | "start": 23.6, 68 | "confidence": 0.43, 69 | "end": 23.95, 70 | "word": "o.k.", 71 | "punct": "o.k." 72 | }, 73 | { 74 | "start": 38.16, 75 | "confidence": 1, 76 | "end": 38.44, 77 | "word": "thank", 78 | "punct": "Thank" 79 | }, 80 | { 81 | "start": 38.44, 82 | "confidence": 1, 83 | "end": 38.56, 84 | "word": "you", 85 | "punct": "you" 86 | }, 87 | { 88 | "start": 38.56, 89 | "confidence": 1, 90 | "end": 38.82, 91 | "word": "very", 92 | "punct": "very" 93 | }, 94 | { 95 | "start": 38.82, 96 | "confidence": 1, 97 | "end": 39.12, 98 | "word": "much", 99 | "punct": "much." 100 | }, 101 | { 102 | "start": 39.15, 103 | "confidence": 1, 104 | "end": 39.32, 105 | "word": "can", 106 | "punct": "Can" 107 | }, 108 | { 109 | "start": 39.32, 110 | "confidence": 1, 111 | "end": 39.41, 112 | "word": "i", 113 | "punct": "I" 114 | }, 115 | { 116 | "start": 39.41, 117 | "confidence": 1, 118 | "end": 39.67, 119 | "word": "just", 120 | "punct": "just" 121 | }, 122 | { 123 | "start": 39.67, 124 | "confidence": 1, 125 | "end": 39.94, 126 | "word": "say", 127 | "punct": "say" 128 | }, 129 | { 130 | "start": 39.95, 131 | "confidence": 0.96, 132 | "end": 40.39, 133 | "word": "this", 134 | "punct": "this" 135 | }, 136 | { 137 | "start": 40.58, 138 | "confidence": 1, 139 | "end": 40.91, 140 | "word": "first", 141 | "punct": "first" 142 | }, 143 | { 144 | "start": 40.91, 145 | "confidence": 1, 146 | "end": 41, 147 | "word": "of", 148 | "punct": "of" 149 | }, 150 | { 151 | "start": 41, 152 | "confidence": 1, 153 | "end": 41.31, 154 | "word": "all", 155 | "punct": "all." 156 | }, 157 | { 158 | "start": 41.39, 159 | "confidence": 1, 160 | "end": 41.7, 161 | "word": "thank", 162 | "punct": "Thank" 163 | }, 164 | { 165 | "start": 41.7, 166 | "confidence": 1, 167 | "end": 41.85, 168 | "word": "you", 169 | "punct": "you" 170 | }, 171 | { 172 | "start": 41.85, 173 | "confidence": 1, 174 | "end": 42.01, 175 | "word": "all", 176 | "punct": "all" 177 | }, 178 | { 179 | "start": 42.01, 180 | "confidence": 1, 181 | "end": 42.12, 182 | "word": "for", 183 | "punct": "for" 184 | }, 185 | { 186 | "start": 42.12, 187 | "confidence": 1, 188 | "end": 42.45, 189 | "word": "coming", 190 | "punct": "coming" 191 | }, 192 | { 193 | "start": 42.45, 194 | "confidence": 1, 195 | "end": 42.83, 196 | "word": "here", 197 | "punct": "here" 198 | }, 199 | { 200 | "start": 43.01, 201 | "confidence": 1, 202 | "end": 43.59, 203 | "word": "today", 204 | "punct": "today." 205 | }, 206 | { 207 | "start": 44.11, 208 | "confidence": 0.72, 209 | "end": 44.28, 210 | "word": "we", 211 | "punct": "We" 212 | }, 213 | { 214 | "start": 44.3, 215 | "confidence": 1, 216 | "end": 44.6, 217 | "word": "just", 218 | "punct": "just" 219 | }, 220 | { 221 | "start": 44.6, 222 | "confidence": 0.61, 223 | "end": 45.21, 224 | "word": "concluded", 225 | "punct": "concluded" 226 | }, 227 | { 228 | "start": 45.21, 229 | "confidence": 0.74, 230 | "end": 45.37, 231 | "word": "a", 232 | "punct": "a" 233 | }, 234 | { 235 | "start": 45.37, 236 | "confidence": 0.98, 237 | "end": 45.92, 238 | "word": "meeting", 239 | "punct": "meeting" 240 | }, 241 | { 242 | "start": 45.92, 243 | "confidence": 0.91, 244 | "end": 46, 245 | "word": "a", 246 | "punct": "a" 247 | }, 248 | { 249 | "start": 46, 250 | "confidence": 0.99, 251 | "end": 46.33, 252 | "word": "joint", 253 | "punct": "joint" 254 | }, 255 | { 256 | "start": 46.33, 257 | "confidence": 0.86, 258 | "end": 46.69, 259 | "word": "meeting", 260 | "punct": "meeting" 261 | }, 262 | { 263 | "start": 46.69, 264 | "confidence": 0.99, 265 | "end": 46.79, 266 | "word": "of", 267 | "punct": "of" 268 | }, 269 | { 270 | "start": 46.79, 271 | "confidence": 1, 272 | "end": 46.88, 273 | "word": "the", 274 | "punct": "the" 275 | }, 276 | { 277 | "start": 46.88, 278 | "confidence": 1, 279 | "end": 47.2, 280 | "word": "shadow", 281 | "punct": "shadow" 282 | }, 283 | { 284 | "start": 47.2, 285 | "confidence": 1, 286 | "end": 47.69, 287 | "word": "cabinet", 288 | "punct": "cabinet" 289 | }, 290 | { 291 | "start": 47.69, 292 | "confidence": 0.62, 293 | "end": 47.82, 294 | "word": "and", 295 | "punct": "and" 296 | }, 297 | { 298 | "start": 47.82, 299 | "confidence": 0.69, 300 | "end": 47.9, 301 | "word": "the", 302 | "punct": "the" 303 | }, 304 | { 305 | "start": 47.9, 306 | "confidence": 1, 307 | "end": 48.26, 308 | "word": "national", 309 | "punct": "National" 310 | }, 311 | { 312 | "start": 48.26, 313 | "confidence": 1, 314 | "end": 49.07, 315 | "word": "executive", 316 | "punct": "Executive" 317 | }, 318 | { 319 | "start": 49.69, 320 | "confidence": 1, 321 | "end": 50.21, 322 | "word": "and", 323 | "punct": "and" 324 | }, 325 | { 326 | "start": 50.61, 327 | "confidence": 0.83, 328 | "end": 51.32, 329 | "word": "discuss", 330 | "punct": "discuss" 331 | }, 332 | { 333 | "start": 51.69, 334 | "confidence": 0.6, 335 | "end": 51.88, 336 | "word": "a", 337 | "punct": "a" 338 | }, 339 | { 340 | "start": 51.89, 341 | "confidence": 1, 342 | "end": 52.6, 343 | "word": "manifesto", 344 | "punct": "manifesto" 345 | }, 346 | { 347 | "start": 52.6, 348 | "confidence": 1, 349 | "end": 52.7, 350 | "word": "for", 351 | "punct": "for" 352 | }, 353 | { 354 | "start": 52.7, 355 | "confidence": 1, 356 | "end": 52.82, 357 | "word": "the", 358 | "punct": "the" 359 | }, 360 | { 361 | "start": 52.82, 362 | "confidence": 1, 363 | "end": 53.19, 364 | "word": "general", 365 | "punct": "general" 366 | }, 367 | { 368 | "start": 53.19, 369 | "confidence": 1, 370 | "end": 53.7, 371 | "word": "election", 372 | "punct": "election." 373 | }, 374 | { 375 | "start": 54.04, 376 | "confidence": 0.35, 377 | "end": 54.15, 378 | "word": "we", 379 | "punct": "We" 380 | }, 381 | { 382 | "start": 54.29, 383 | "confidence": 0.99, 384 | "end": 54.7, 385 | "word": "just", 386 | "punct": "just" 387 | }, 388 | { 389 | "start": 54.79, 390 | "confidence": 1, 391 | "end": 55.77, 392 | "word": "unanimously", 393 | "punct": "unanimously" 394 | }, 395 | { 396 | "start": 55.77, 397 | "confidence": 1, 398 | "end": 56.36, 399 | "word": "agreed", 400 | "punct": "agreed" 401 | }, 402 | { 403 | "start": 56.53, 404 | "confidence": 0.94, 405 | "end": 56.61, 406 | "word": "the", 407 | "punct": "the" 408 | }, 409 | { 410 | "start": 56.63, 411 | "confidence": 0.97, 412 | "end": 57.25, 413 | "word": "contents", 414 | "punct": "contents" 415 | }, 416 | { 417 | "start": 57.28, 418 | "confidence": 1, 419 | "end": 57.49, 420 | "word": "of", 421 | "punct": "of" 422 | }, 423 | { 424 | "start": 57.49, 425 | "confidence": 0.52, 426 | "end": 57.76, 427 | "word": "it", 428 | "punct": "it." 429 | }, 430 | { 431 | "start": 58.34, 432 | "confidence": 0.64, 433 | "end": 58.73, 434 | "word": "we've", 435 | "punct": "We've" 436 | }, 437 | { 438 | "start": 59.08, 439 | "confidence": 0.51, 440 | "end": 59.72, 441 | "word": "mended", 442 | "punct": "mended." 443 | }, 444 | { 445 | "start": 59.95, 446 | "confidence": 0.58, 447 | "end": 60.26, 448 | "word": "draft", 449 | "punct": "Draft" 450 | }, 451 | { 452 | "start": 60.36, 453 | "confidence": 0.93, 454 | "end": 60.82, 455 | "word": "document", 456 | "punct": "document" 457 | }, 458 | { 459 | "start": 60.84, 460 | "confidence": 1, 461 | "end": 60.99, 462 | "word": "was", 463 | "punct": "was" 464 | }, 465 | { 466 | "start": 60.99, 467 | "confidence": 1, 468 | "end": 61.2, 469 | "word": "put", 470 | "punct": "put" 471 | }, 472 | { 473 | "start": 61.2, 474 | "confidence": 1, 475 | "end": 61.69, 476 | "word": "forward", 477 | "punct": "forward" 478 | }, 479 | { 480 | "start": 61.88, 481 | "confidence": 0.91, 482 | "end": 62.06, 483 | "word": "in", 484 | "punct": "in" 485 | }, 486 | { 487 | "start": 62.06, 488 | "confidence": 0.87, 489 | "end": 62.17, 490 | "word": "the", 491 | "punct": "the" 492 | }, 493 | { 494 | "start": 62.17, 495 | "confidence": 1, 496 | "end": 62.76, 497 | "word": "most", 498 | "punct": "most" 499 | }, 500 | { 501 | "start": 63.43, 502 | "confidence": 0.88, 503 | "end": 64.38, 504 | "word": "informed", 505 | "punct": "informed." 506 | }, 507 | { 508 | "start": 64.77, 509 | "confidence": 1, 510 | "end": 65.62, 511 | "word": "interesting", 512 | "punct": "Interesting" 513 | }, 514 | { 515 | "start": 65.91, 516 | "confidence": 1, 517 | "end": 66.75, 518 | "word": "sensible", 519 | "punct": "sensible" 520 | }, 521 | { 522 | "start": 66.88, 523 | "confidence": 1, 524 | "end": 67.43, 525 | "word": "discussion", 526 | "punct": "discussion" 527 | }, 528 | { 529 | "start": 67.43, 530 | "confidence": 0.94, 531 | "end": 67.51, 532 | "word": "and", 533 | "punct": "and" 534 | }, 535 | { 536 | "start": 67.51, 537 | "confidence": 1, 538 | "end": 67.84, 539 | "word": "debate", 540 | "punct": "debate" 541 | }, 542 | { 543 | "start": 68.45, 544 | "confidence": 1, 545 | "end": 68.72, 546 | "word": "in", 547 | "punct": "in" 548 | }, 549 | { 550 | "start": 68.75, 551 | "confidence": 0.84, 552 | "end": 68.91, 553 | "word": "a", 554 | "punct": "a" 555 | }, 556 | { 557 | "start": 68.91, 558 | "confidence": 0.98, 559 | "end": 69.48, 560 | "word": "party", 561 | "punct": "party" 562 | }, 563 | { 564 | "start": 69.94, 565 | "confidence": 0.51, 566 | "end": 70.2, 567 | "word": "and", 568 | "punct": "and" 569 | }, 570 | { 571 | "start": 70.24, 572 | "confidence": 0.7, 573 | "end": 70.44, 574 | "word": "will", 575 | "punct": "will" 576 | }, 577 | { 578 | "start": 70.43, 579 | "confidence": 1, 580 | "end": 70.84, 581 | "word": "present", 582 | "punct": "present" 583 | }, 584 | { 585 | "start": 70.85, 586 | "confidence": 0.35, 587 | "end": 71, 588 | "word": "his", 589 | "punct": "his" 590 | }, 591 | { 592 | "start": 71.02, 593 | "confidence": 1, 594 | "end": 71.82, 595 | "word": "manifesto", 596 | "punct": "manifesto." 597 | }, 598 | { 599 | "start": 72.21, 600 | "confidence": 1, 601 | "end": 72.56, 602 | "word": "british", 603 | "punct": "British" 604 | }, 605 | { 606 | "start": 72.56, 607 | "confidence": 1, 608 | "end": 73.08, 609 | "word": "people", 610 | "punct": "people" 611 | }, 612 | { 613 | "start": 73.26, 614 | "confidence": 0.98, 615 | "end": 73.39, 616 | "word": "in", 617 | "punct": "in" 618 | }, 619 | { 620 | "start": 73.39, 621 | "confidence": 1, 622 | "end": 73.46, 623 | "word": "the", 624 | "punct": "the" 625 | }, 626 | { 627 | "start": 73.46, 628 | "confidence": 1, 629 | "end": 73.71, 630 | "word": "next", 631 | "punct": "next" 632 | }, 633 | { 634 | "start": 73.71, 635 | "confidence": 1, 636 | "end": 73.87, 637 | "word": "few", 638 | "punct": "few" 639 | }, 640 | { 641 | "start": 73.87, 642 | "confidence": 1, 643 | "end": 74.4, 644 | "word": "days", 645 | "punct": "days" 646 | }, 647 | { 648 | "start": 75.99, 649 | "confidence": 1, 650 | "end": 76.16, 651 | "word": "will", 652 | "punct": "will" 653 | }, 654 | { 655 | "start": 76.16, 656 | "confidence": 1, 657 | "end": 76.28, 658 | "word": "be", 659 | "punct": "be" 660 | }, 661 | { 662 | "start": 76.28, 663 | "confidence": 1, 664 | "end": 76.38, 665 | "word": "an", 666 | "punct": "an" 667 | }, 668 | { 669 | "start": 76.38, 670 | "confidence": 1, 671 | "end": 76.8, 672 | "word": "offer", 673 | "punct": "offer." 674 | }, 675 | { 676 | "start": 76.95, 677 | "confidence": 0.87, 678 | "end": 77.23, 679 | "word": "we", 680 | "punct": "We" 681 | }, 682 | { 683 | "start": 77.23, 684 | "confidence": 0.46, 685 | "end": 77.45, 686 | "word": "believe", 687 | "punct": "believe" 688 | }, 689 | { 690 | "start": 77.54, 691 | "confidence": 0.5, 692 | "end": 77.7, 693 | "word": "the", 694 | "punct": "the" 695 | }, 696 | { 697 | "start": 77.89, 698 | "confidence": 0.95, 699 | "end": 78.41, 700 | "word": "policies", 701 | "punct": "policies" 702 | }, 703 | { 704 | "start": 78.41, 705 | "confidence": 0.86, 706 | "end": 78.53, 707 | "word": "in", 708 | "punct": "in" 709 | }, 710 | { 711 | "start": 78.52, 712 | "confidence": 0.74, 713 | "end": 78.68, 714 | "word": "it", 715 | "punct": "it" 716 | }, 717 | { 718 | "start": 78.86, 719 | "confidence": 0.51, 720 | "end": 78.99, 721 | "word": "are", 722 | "punct": "are" 723 | }, 724 | { 725 | "start": 78.99, 726 | "confidence": 1, 727 | "end": 79.26, 728 | "word": "very", 729 | "punct": "very" 730 | }, 731 | { 732 | "start": 79.26, 733 | "confidence": 1, 734 | "end": 79.83, 735 | "word": "popular", 736 | "punct": "popular" 737 | }, 738 | { 739 | "start": 80.32, 740 | "confidence": 0.61, 741 | "end": 80.45, 742 | "word": "an", 743 | "punct": "an" 744 | }, 745 | { 746 | "start": 80.46, 747 | "confidence": 1, 748 | "end": 80.91, 749 | "word": "offer", 750 | "punct": "offer" 751 | }, 752 | { 753 | "start": 81.02, 754 | "confidence": 0.57, 755 | "end": 81.1, 756 | "word": "that", 757 | "punct": "that" 758 | }, 759 | { 760 | "start": 81.17, 761 | "confidence": 0.97, 762 | "end": 81.35, 763 | "word": "will", 764 | "punct": "will" 765 | }, 766 | { 767 | "start": 81.35, 768 | "confidence": 0.99, 769 | "end": 82, 770 | "word": "transform", 771 | "punct": "transform" 772 | }, 773 | { 774 | "start": 82, 775 | "confidence": 1, 776 | "end": 82.1, 777 | "word": "the", 778 | "punct": "the" 779 | }, 780 | { 781 | "start": 82.1, 782 | "confidence": 1, 783 | "end": 82.68, 784 | "word": "lives", 785 | "punct": "lives" 786 | }, 787 | { 788 | "start": 82.82, 789 | "confidence": 1, 790 | "end": 82.97, 791 | "word": "of", 792 | "punct": "of" 793 | }, 794 | { 795 | "start": 82.97, 796 | "confidence": 1, 797 | "end": 83.21, 798 | "word": "many", 799 | "punct": "many" 800 | }, 801 | { 802 | "start": 83.21, 803 | "confidence": 1, 804 | "end": 83.69, 805 | "word": "people", 806 | "punct": "people" 807 | }, 808 | { 809 | "start": 83.81, 810 | "confidence": 1, 811 | "end": 83.93, 812 | "word": "in", 813 | "punct": "in" 814 | }, 815 | { 816 | "start": 83.93, 817 | "confidence": 0.99, 818 | "end": 84.08, 819 | "word": "our", 820 | "punct": "our" 821 | }, 822 | { 823 | "start": 84.08, 824 | "confidence": 1, 825 | "end": 84.84, 826 | "word": "society", 827 | "punct": "society" 828 | }, 829 | { 830 | "start": 85.18, 831 | "confidence": 0.88, 832 | "end": 85.42, 833 | "word": "and", 834 | "punct": "and" 835 | }, 836 | { 837 | "start": 85.43, 838 | "confidence": 0.83, 839 | "end": 86.06, 840 | "word": "ensure", 841 | "punct": "ensure" 842 | }, 843 | { 844 | "start": 86.43, 845 | "confidence": 1, 846 | "end": 86.67, 847 | "word": "we", 848 | "punct": "we" 849 | }, 850 | { 851 | "start": 86.67, 852 | "confidence": 0.99, 853 | "end": 86.79, 854 | "word": "have", 855 | "punct": "have" 856 | }, 857 | { 858 | "start": 86.79, 859 | "confidence": 0.98, 860 | "end": 86.87, 861 | "word": "a", 862 | "punct": "a" 863 | }, 864 | { 865 | "start": 86.87, 866 | "confidence": 1, 867 | "end": 87.33, 868 | "word": "government", 869 | "punct": "government" 870 | }, 871 | { 872 | "start": 87.33, 873 | "confidence": 1, 874 | "end": 87.47, 875 | "word": "in", 876 | "punct": "in" 877 | }, 878 | { 879 | "start": 87.47, 880 | "confidence": 1, 881 | "end": 87.95, 882 | "word": "britain", 883 | "punct": "Britain." 884 | }, 885 | { 886 | "start": 88.38, 887 | "confidence": 1, 888 | "end": 88.62, 889 | "word": "on", 890 | "punct": "On" 891 | }, 892 | { 893 | "start": 88.62, 894 | "confidence": 1, 895 | "end": 88.85, 896 | "word": "june", 897 | "punct": "June," 898 | }, 899 | { 900 | "start": 88.85, 901 | "confidence": 1, 902 | "end": 88.99, 903 | "word": "the", 904 | "punct": "the" 905 | }, 906 | { 907 | "start": 88.99, 908 | "confidence": 1, 909 | "end": 89.45, 910 | "word": "eighth", 911 | "punct": "eighth." 912 | }, 913 | { 914 | "start": 89.82, 915 | "confidence": 1, 916 | "end": 90.07, 917 | "word": "that", 918 | "punct": "That" 919 | }, 920 | { 921 | "start": 90.07, 922 | "confidence": 0.98, 923 | "end": 90.37, 924 | "word": "will", 925 | "punct": "will" 926 | }, 927 | { 928 | "start": 90.47, 929 | "confidence": 1, 930 | "end": 90.8, 931 | "word": "work", 932 | "punct": "work" 933 | }, 934 | { 935 | "start": 90.8, 936 | "confidence": 1, 937 | "end": 90.92, 938 | "word": "for", 939 | "punct": "for" 940 | }, 941 | { 942 | "start": 90.92, 943 | "confidence": 1, 944 | "end": 91.03, 945 | "word": "the", 946 | "punct": "the" 947 | }, 948 | { 949 | "start": 91.03, 950 | "confidence": 1, 951 | "end": 91.43, 952 | "word": "many", 953 | "punct": "many." 954 | }, 955 | { 956 | "start": 91.58, 957 | "confidence": 1, 958 | "end": 91.86, 959 | "word": "not", 960 | "punct": "Not" 961 | }, 962 | { 963 | "start": 91.86, 964 | "confidence": 1, 965 | "end": 91.94, 966 | "word": "the", 967 | "punct": "the" 968 | }, 969 | { 970 | "start": 91.94, 971 | "confidence": 1, 972 | "end": 92.41, 973 | "word": "few", 974 | "punct": "few." 975 | }, 976 | { 977 | "start": 92.83, 978 | "confidence": 1, 979 | "end": 93.05, 980 | "word": "give", 981 | "punct": "Give" 982 | }, 983 | { 984 | "start": 93.05, 985 | "confidence": 1, 986 | "end": 93.61, 987 | "word": "everyone", 988 | "punct": "everyone" 989 | }, 990 | { 991 | "start": 93.78, 992 | "confidence": 0.87, 993 | "end": 93.9, 994 | "word": "in", 995 | "punct": "in" 996 | }, 997 | { 998 | "start": 93.92, 999 | "confidence": 0.82, 1000 | "end": 94.07, 1001 | "word": "our", 1002 | "punct": "our" 1003 | }, 1004 | { 1005 | "start": 94.07, 1006 | "confidence": 1, 1007 | "end": 94.89, 1008 | "word": "society", 1009 | "punct": "society," 1010 | }, 1011 | { 1012 | "start": 95.08, 1013 | "confidence": 0.65, 1014 | "end": 95.22, 1015 | "word": "a", 1016 | "punct": "a" 1017 | }, 1018 | { 1019 | "start": 95.23, 1020 | "confidence": 1, 1021 | "end": 95.66, 1022 | "word": "decent", 1023 | "punct": "decent" 1024 | }, 1025 | { 1026 | "start": 95.66, 1027 | "confidence": 0.79, 1028 | "end": 96.48, 1029 | "word": "opportunity", 1030 | "punct": "opportunity" 1031 | }, 1032 | { 1033 | "start": 96.6, 1034 | "confidence": 0.82, 1035 | "end": 96.72, 1036 | "word": "and", 1037 | "punct": "and" 1038 | }, 1039 | { 1040 | "start": 96.74, 1041 | "confidence": 0.96, 1042 | "end": 96.82, 1043 | "word": "a", 1044 | "punct": "a" 1045 | }, 1046 | { 1047 | "start": 96.82, 1048 | "confidence": 0.98, 1049 | "end": 97.24, 1050 | "word": "decent", 1051 | "punct": "decent" 1052 | }, 1053 | { 1054 | "start": 97.24, 1055 | "confidence": 0.92, 1056 | "end": 97.8, 1057 | "word": "chance", 1058 | "punct": "chance." 1059 | }, 1060 | { 1061 | "start": 98, 1062 | "confidence": 0.93, 1063 | "end": 98.17, 1064 | "word": "so", 1065 | "punct": "So" 1066 | }, 1067 | { 1068 | "start": 98.19, 1069 | "confidence": 0.83, 1070 | "end": 98.62, 1071 | "word": "nobody's", 1072 | "punct": "nobody's" 1073 | }, 1074 | { 1075 | "start": 98.64, 1076 | "confidence": 1, 1077 | "end": 99.18, 1078 | "word": "ignored", 1079 | "punct": "ignored," 1080 | }, 1081 | { 1082 | "start": 99.3, 1083 | "confidence": 0.85, 1084 | "end": 99.75, 1085 | "word": "nobody's", 1086 | "punct": "nobody's" 1087 | }, 1088 | { 1089 | "start": 99.75, 1090 | "confidence": 1, 1091 | "end": 100.3, 1092 | "word": "forgotten", 1093 | "punct": "forgotten." 1094 | }, 1095 | { 1096 | "start": 100.5, 1097 | "confidence": 0.91, 1098 | "end": 100.67, 1099 | "word": "and", 1100 | "punct": "And" 1101 | }, 1102 | { 1103 | "start": 100.67, 1104 | "confidence": 0.55, 1105 | "end": 100.86, 1106 | "word": "nobody", 1107 | "punct": "nobody" 1108 | }, 1109 | { 1110 | "start": 100.86, 1111 | "confidence": 0.54, 1112 | "end": 101.21, 1113 | "word": "is", 1114 | "punct": "is" 1115 | }, 1116 | { 1117 | "start": 101.29, 1118 | "confidence": 1, 1119 | "end": 101.56, 1120 | "word": "left", 1121 | "punct": "left" 1122 | }, 1123 | { 1124 | "start": 101.56, 1125 | "confidence": 1, 1126 | "end": 102.11, 1127 | "word": "behind", 1128 | "punct": "behind" 1129 | }, 1130 | { 1131 | "start": 102.49, 1132 | "confidence": 0.73, 1133 | "end": 102.6, 1134 | "word": "the", 1135 | "punct": "the" 1136 | }, 1137 | { 1138 | "start": 102.61, 1139 | "confidence": 1, 1140 | "end": 103.4, 1141 | "word": "details", 1142 | "punct": "details" 1143 | }, 1144 | { 1145 | "start": 103.55, 1146 | "confidence": 1, 1147 | "end": 103.7, 1148 | "word": "will", 1149 | "punct": "will" 1150 | }, 1151 | { 1152 | "start": 103.7, 1153 | "confidence": 1, 1154 | "end": 103.82, 1155 | "word": "be", 1156 | "punct": "be" 1157 | }, 1158 | { 1159 | "start": 103.82, 1160 | "confidence": 1, 1161 | "end": 104.49, 1162 | "word": "published", 1163 | "punct": "published" 1164 | }, 1165 | { 1166 | "start": 104.63, 1167 | "confidence": 1, 1168 | "end": 104.76, 1169 | "word": "in", 1170 | "punct": "in" 1171 | }, 1172 | { 1173 | "start": 104.76, 1174 | "confidence": 1, 1175 | "end": 104.83, 1176 | "word": "the", 1177 | "punct": "the" 1178 | }, 1179 | { 1180 | "start": 104.83, 1181 | "confidence": 1, 1182 | "end": 105.08, 1183 | "word": "next", 1184 | "punct": "next" 1185 | }, 1186 | { 1187 | "start": 105.08, 1188 | "confidence": 0.99, 1189 | "end": 105.25, 1190 | "word": "few", 1191 | "punct": "few" 1192 | }, 1193 | { 1194 | "start": 105.25, 1195 | "confidence": 1, 1196 | "end": 105.78, 1197 | "word": "days", 1198 | "punct": "days," 1199 | }, 1200 | { 1201 | "start": 106.08, 1202 | "confidence": 0.97, 1203 | "end": 106.21, 1204 | "word": "the", 1205 | "punct": "the" 1206 | }, 1207 | { 1208 | "start": 106.22, 1209 | "confidence": 1, 1210 | "end": 106.95, 1211 | "word": "details", 1212 | "punct": "details" 1213 | }, 1214 | { 1215 | "start": 107.1, 1216 | "confidence": 0.8, 1217 | "end": 107.29, 1218 | "word": "will", 1219 | "punct": "will" 1220 | }, 1221 | { 1222 | "start": 107.29, 1223 | "confidence": 0.78, 1224 | "end": 107.41, 1225 | "word": "be", 1226 | "punct": "be" 1227 | }, 1228 | { 1229 | "start": 107.41, 1230 | "confidence": 0.88, 1231 | "end": 107.74, 1232 | "word": "set", 1233 | "punct": "set" 1234 | }, 1235 | { 1236 | "start": 107.74, 1237 | "confidence": 1, 1238 | "end": 107.98, 1239 | "word": "out", 1240 | "punct": "out" 1241 | }, 1242 | { 1243 | "start": 107.98, 1244 | "confidence": 1, 1245 | "end": 108.22, 1246 | "word": "to", 1247 | "punct": "to" 1248 | }, 1249 | { 1250 | "start": 108.22, 1251 | "confidence": 1, 1252 | "end": 108.49, 1253 | "word": "you", 1254 | "punct": "you," 1255 | }, 1256 | { 1257 | "start": 108.63, 1258 | "confidence": 1, 1259 | "end": 109.41, 1260 | "word": "including", 1261 | "punct": "including" 1262 | }, 1263 | { 1264 | "start": 109.7, 1265 | "confidence": 0.87, 1266 | "end": 109.79, 1267 | "word": "the", 1268 | "punct": "the" 1269 | }, 1270 | { 1271 | "start": 109.82, 1272 | "confidence": 1, 1273 | "end": 110.59, 1274 | "word": "costings", 1275 | "punct": "costings" 1276 | }, 1277 | { 1278 | "start": 110.71, 1279 | "confidence": 1, 1280 | "end": 110.94, 1281 | "word": "of", 1282 | "punct": "of" 1283 | }, 1284 | { 1285 | "start": 110.97, 1286 | "confidence": 1, 1287 | "end": 111.46, 1288 | "word": "all", 1289 | "punct": "all" 1290 | }, 1291 | { 1292 | "start": 111.55, 1293 | "confidence": 0.59, 1294 | "end": 111.6, 1295 | "word": "the", 1296 | "punct": "the" 1297 | }, 1298 | { 1299 | "start": 111.65, 1300 | "confidence": 0.99, 1301 | "end": 112.24, 1302 | "word": "pledges", 1303 | "punct": "pledges" 1304 | }, 1305 | { 1306 | "start": 112.44, 1307 | "confidence": 1, 1308 | "end": 113.05, 1309 | "word": "promises", 1310 | "punct": "promises" 1311 | }, 1312 | { 1313 | "start": 113.24, 1314 | "confidence": 1, 1315 | "end": 113.42, 1316 | "word": "we", 1317 | "punct": "we" 1318 | }, 1319 | { 1320 | "start": 113.42, 1321 | "confidence": 0.99, 1322 | "end": 113.75, 1323 | "word": "make", 1324 | "punct": "make" 1325 | }, 1326 | { 1327 | "start": 114.01, 1328 | "confidence": 0.82, 1329 | "end": 114.14, 1330 | "word": "and", 1331 | "punct": "and" 1332 | }, 1333 | { 1334 | "start": 114.17, 1335 | "confidence": 1, 1336 | "end": 114.28, 1337 | "word": "i", 1338 | "punct": "I" 1339 | }, 1340 | { 1341 | "start": 114.28, 1342 | "confidence": 1, 1343 | "end": 114.76, 1344 | "word": "know", 1345 | "punct": "know" 1346 | }, 1347 | { 1348 | "start": 114.85, 1349 | "confidence": 0.94, 1350 | "end": 115.06, 1351 | "word": "you're", 1352 | "punct": "you're" 1353 | }, 1354 | { 1355 | "start": 115.06, 1356 | "confidence": 1, 1357 | "end": 115.23, 1358 | "word": "all", 1359 | "punct": "all" 1360 | }, 1361 | { 1362 | "start": 115.23, 1363 | "confidence": 1, 1364 | "end": 115.52, 1365 | "word": "looking", 1366 | "punct": "looking" 1367 | }, 1368 | { 1369 | "start": 115.52, 1370 | "confidence": 1, 1371 | "end": 115.83, 1372 | "word": "forward", 1373 | "punct": "forward" 1374 | }, 1375 | { 1376 | "start": 115.83, 1377 | "confidence": 1, 1378 | "end": 115.95, 1379 | "word": "to", 1380 | "punct": "to" 1381 | }, 1382 | { 1383 | "start": 115.95, 1384 | "confidence": 1, 1385 | "end": 116.32, 1386 | "word": "reading", 1387 | "punct": "reading" 1388 | }, 1389 | { 1390 | "start": 116.32, 1391 | "confidence": 0.96, 1392 | "end": 116.44, 1393 | "word": "it", 1394 | "punct": "it" 1395 | }, 1396 | { 1397 | "start": 116.57, 1398 | "confidence": 1, 1399 | "end": 116.73, 1400 | "word": "in", 1401 | "punct": "in" 1402 | }, 1403 | { 1404 | "start": 116.73, 1405 | "confidence": 1, 1406 | "end": 117.05, 1407 | "word": "great", 1408 | "punct": "great" 1409 | }, 1410 | { 1411 | "start": 117.05, 1412 | "confidence": 1, 1413 | "end": 117.63, 1414 | "word": "detail", 1415 | "punct": "detail" 1416 | }, 1417 | { 1418 | "start": 117.73, 1419 | "confidence": 0.88, 1420 | "end": 117.88, 1421 | "word": "at", 1422 | "punct": "at" 1423 | }, 1424 | { 1425 | "start": 117.89, 1426 | "confidence": 1, 1427 | "end": 118.16, 1428 | "word": "that", 1429 | "punct": "that" 1430 | }, 1431 | { 1432 | "start": 118.16, 1433 | "confidence": 1, 1434 | "end": 118.6, 1435 | "word": "time", 1436 | "punct": "time" 1437 | }, 1438 | { 1439 | "start": 118.92, 1440 | "confidence": 0.81, 1441 | "end": 119.12, 1442 | "word": "at", 1443 | "punct": "at" 1444 | }, 1445 | { 1446 | "start": 119.17, 1447 | "confidence": 1, 1448 | "end": 119.48, 1449 | "word": "that", 1450 | "punct": "that" 1451 | }, 1452 | { 1453 | "start": 119.48, 1454 | "confidence": 0.92, 1455 | "end": 119.78, 1456 | "word": "point", 1457 | "punct": "point" 1458 | }, 1459 | { 1460 | "start": 119.78, 1461 | "confidence": 0.81, 1462 | "end": 120.1, 1463 | "word": "there", 1464 | "punct": "there" 1465 | }, 1466 | { 1467 | "start": 120.42, 1468 | "confidence": 0.97, 1469 | "end": 120.6, 1470 | "word": "at", 1471 | "punct": "at" 1472 | }, 1473 | { 1474 | "start": 120.64, 1475 | "confidence": 1, 1476 | "end": 120.94, 1477 | "word": "that", 1478 | "punct": "that" 1479 | }, 1480 | { 1481 | "start": 120.94, 1482 | "confidence": 0.99, 1483 | "end": 121.52, 1484 | "word": "point", 1485 | "punct": "point." 1486 | }, 1487 | { 1488 | "start": 121.68, 1489 | "confidence": 0.65, 1490 | "end": 121.92, 1491 | "word": "you'll", 1492 | "punct": "You'll" 1493 | }, 1494 | { 1495 | "start": 121.96, 1496 | "confidence": 1, 1497 | "end": 122.05, 1498 | "word": "be", 1499 | "punct": "be" 1500 | }, 1501 | { 1502 | "start": 122.05, 1503 | "confidence": 1, 1504 | "end": 122.23, 1505 | "word": "able", 1506 | "punct": "able" 1507 | }, 1508 | { 1509 | "start": 122.23, 1510 | "confidence": 1, 1511 | "end": 122.37, 1512 | "word": "to", 1513 | "punct": "to" 1514 | }, 1515 | { 1516 | "start": 122.37, 1517 | "confidence": 1, 1518 | "end": 122.73, 1519 | "word": "ask", 1520 | "punct": "ask" 1521 | }, 1522 | { 1523 | "start": 122.82, 1524 | "confidence": 1, 1525 | "end": 123.09, 1526 | "word": "all", 1527 | "punct": "all" 1528 | }, 1529 | { 1530 | "start": 123.09, 1531 | "confidence": 1, 1532 | "end": 123.19, 1533 | "word": "the", 1534 | "punct": "the" 1535 | }, 1536 | { 1537 | "start": 123.19, 1538 | "confidence": 1, 1539 | "end": 123.76, 1540 | "word": "questions", 1541 | "punct": "questions" 1542 | }, 1543 | { 1544 | "start": 123.9, 1545 | "confidence": 0.9, 1546 | "end": 124.06, 1547 | "word": "you", 1548 | "punct": "you" 1549 | }, 1550 | { 1551 | "start": 124.06, 1552 | "confidence": 0.99, 1553 | "end": 124.33, 1554 | "word": "like", 1555 | "punct": "like" 1556 | }, 1557 | { 1558 | "start": 124.62, 1559 | "confidence": 0.88, 1560 | "end": 124.8, 1561 | "word": "that", 1562 | "punct": "that" 1563 | }, 1564 | { 1565 | "start": 124.88, 1566 | "confidence": 1, 1567 | "end": 125.46, 1568 | "word": "today", 1569 | "punct": "today." 1570 | }, 1571 | { 1572 | "start": 125.71, 1573 | "confidence": 1, 1574 | "end": 125.97, 1575 | "word": "thank", 1576 | "punct": "Thank" 1577 | }, 1578 | { 1579 | "start": 125.97, 1580 | "confidence": 1, 1581 | "end": 126.09, 1582 | "word": "you", 1583 | "punct": "you" 1584 | }, 1585 | { 1586 | "start": 126.08, 1587 | "confidence": 0.63, 1588 | "end": 126.22, 1589 | "word": "all", 1590 | "punct": "all" 1591 | }, 1592 | { 1593 | "start": 126.52, 1594 | "confidence": 1, 1595 | "end": 126.85, 1596 | "word": "very", 1597 | "punct": "very" 1598 | }, 1599 | { 1600 | "start": 126.85, 1601 | "confidence": 1, 1602 | "end": 126.99, 1603 | "word": "much", 1604 | "punct": "much." 1605 | }, 1606 | { 1607 | "start": 127.18, 1608 | "confidence": 0.99, 1609 | "end": 127.48, 1610 | "word": "thank", 1611 | "punct": "Thank" 1612 | }, 1613 | { 1614 | "start": 127.48, 1615 | "confidence": 0.98, 1616 | "end": 127.6, 1617 | "word": "you", 1618 | "punct": "you" 1619 | }, 1620 | { 1621 | "start": 127.6, 1622 | "confidence": 0.81, 1623 | "end": 128.01, 1624 | "word": "all", 1625 | "punct": "all." 1626 | }, 1627 | { 1628 | "start": 128.16, 1629 | "confidence": 1, 1630 | "end": 128.43, 1631 | "word": "thank", 1632 | "punct": "Thank" 1633 | }, 1634 | { 1635 | "start": 128.43, 1636 | "confidence": 0.95, 1637 | "end": 128.72, 1638 | "word": "you", 1639 | "punct": "you" 1640 | }, 1641 | { 1642 | "start": 128.72, 1643 | "confidence": 0.56, 1644 | "end": 128.77, 1645 | "word": "all", 1646 | "punct": "all." 1647 | }, 1648 | { 1649 | "start": 131.31, 1650 | "confidence": 1, 1651 | "end": 131.61, 1652 | "word": "thank", 1653 | "punct": "Thank" 1654 | }, 1655 | { 1656 | "start": 131.61, 1657 | "confidence": 1, 1658 | "end": 131.75, 1659 | "word": "you", 1660 | "punct": "you" 1661 | }, 1662 | { 1663 | "start": 131.75, 1664 | "confidence": 1, 1665 | "end": 132.13, 1666 | "word": "all", 1667 | "punct": "all" 1668 | }, 1669 | { 1670 | "start": 132.27, 1671 | "confidence": 1, 1672 | "end": 132.56, 1673 | "word": "very", 1674 | "punct": "very" 1675 | }, 1676 | { 1677 | "start": 132.56, 1678 | "confidence": 1, 1679 | "end": 132.94, 1680 | "word": "much", 1681 | "punct": "much" 1682 | }, 1683 | { 1684 | "start": 133.03, 1685 | "confidence": 1, 1686 | "end": 133.13, 1687 | "word": "for", 1688 | "punct": "for" 1689 | }, 1690 | { 1691 | "start": 133.16, 1692 | "confidence": 1, 1693 | "end": 133.44, 1694 | "word": "coming", 1695 | "punct": "coming" 1696 | }, 1697 | { 1698 | "start": 133.44, 1699 | "confidence": 1, 1700 | "end": 133.78, 1701 | "word": "today", 1702 | "punct": "today." 1703 | }, 1704 | { 1705 | "start": 134.17, 1706 | "confidence": 0.68, 1707 | "end": 136.1, 1708 | "word": "the", 1709 | "punct": "The" 1710 | } 1711 | ] 1712 | } -------------------------------------------------------------------------------- /src/adapters/__tests__/fixtures/kaldi-2-segmentation.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "version": "0.0.10" 4 | }, 5 | "@type": "AudioFile", 6 | "speakers": [ 7 | { 8 | "@id": "S0", 9 | "gender": "M" 10 | }, 11 | { 12 | "@id": "S6", 13 | "gender": "M" 14 | }, 15 | { 16 | "@id": "S10", 17 | "gender": "M" 18 | }, 19 | { 20 | "@id": "S11", 21 | "gender": "M" 22 | }, 23 | { 24 | "@id": "S16", 25 | "gender": "M" 26 | }, 27 | { 28 | "@id": "S18", 29 | "gender": "M" 30 | } 31 | ], 32 | "segments": [ 33 | { 34 | "@type": "Segment", 35 | "start": 1.34, 36 | "duration": 4.09, 37 | "bandwidth": "S", 38 | "speaker": { 39 | "@id": "S0", 40 | "gender": "M" 41 | } 42 | }, 43 | { 44 | "@type": "Segment", 45 | "start": 6.73, 46 | "duration": 6.5, 47 | "bandwidth": "S", 48 | "speaker": { 49 | "@id": "S0", 50 | "gender": "M" 51 | } 52 | }, 53 | { 54 | "@type": "Segment", 55 | "start": 13.85, 56 | "duration": 1.97, 57 | "bandwidth": "S", 58 | "speaker": { 59 | "@id": "S0", 60 | "gender": "M" 61 | } 62 | }, 63 | { 64 | "@type": "Segment", 65 | "start": 33.62, 66 | "duration": 3.18, 67 | "bandwidth": "S", 68 | "speaker": { 69 | "@id": "S6", 70 | "gender": "M" 71 | } 72 | }, 73 | { 74 | "@type": "Segment", 75 | "start": 45.03, 76 | "duration": 4.93, 77 | "bandwidth": "S", 78 | "speaker": { 79 | "@id": "S10", 80 | "gender": "M" 81 | } 82 | }, 83 | { 84 | "@type": "Segment", 85 | "start": 50.87, 86 | "duration": 2.42, 87 | "bandwidth": "S", 88 | "speaker": { 89 | "@id": "S10", 90 | "gender": "M" 91 | } 92 | }, 93 | { 94 | "@type": "Segment", 95 | "start": 54.12, 96 | "duration": 3.17, 97 | "bandwidth": "S", 98 | "speaker": { 99 | "@id": "S10", 100 | "gender": "M" 101 | } 102 | }, 103 | { 104 | "@type": "Segment", 105 | "start": 58.23, 106 | "duration": 2.98, 107 | "bandwidth": "S", 108 | "speaker": { 109 | "@id": "S10", 110 | "gender": "M" 111 | } 112 | }, 113 | { 114 | "@type": "Segment", 115 | "start": 61.81, 116 | "duration": 2.45, 117 | "bandwidth": "S", 118 | "speaker": { 119 | "@id": "S10", 120 | "gender": "M" 121 | } 122 | }, 123 | { 124 | "@type": "Segment", 125 | "start": 65.18, 126 | "duration": 2.17, 127 | "bandwidth": "S", 128 | "speaker": { 129 | "@id": "S10", 130 | "gender": "M" 131 | } 132 | }, 133 | { 134 | "@type": "Segment", 135 | "start": 70.99, 136 | "duration": 6.62, 137 | "bandwidth": "S", 138 | "speaker": { 139 | "@id": "S11", 140 | "gender": "M" 141 | } 142 | }, 143 | { 144 | "@type": "Segment", 145 | "start": 83.27, 146 | "duration": 5.47, 147 | "bandwidth": "S", 148 | "speaker": { 149 | "@id": "S11", 150 | "gender": "M" 151 | } 152 | }, 153 | { 154 | "@type": "Segment", 155 | "start": 89.87, 156 | "duration": 1.76, 157 | "bandwidth": "S", 158 | "speaker": { 159 | "@id": "S11", 160 | "gender": "M" 161 | } 162 | }, 163 | { 164 | "@type": "Segment", 165 | "start": 92.07, 166 | "duration": 6.13, 167 | "bandwidth": "S", 168 | "speaker": { 169 | "@id": "S11", 170 | "gender": "M" 171 | } 172 | }, 173 | { 174 | "@type": "Segment", 175 | "start": 100.37, 176 | "duration": 1.89, 177 | "bandwidth": "S", 178 | "speaker": { 179 | "@id": "S16", 180 | "gender": "M" 181 | } 182 | }, 183 | { 184 | "@type": "Segment", 185 | "start": 108.62, 186 | "duration": 11.5, 187 | "bandwidth": "S", 188 | "speaker": { 189 | "@id": "S0", 190 | "gender": "M" 191 | } 192 | }, 193 | { 194 | "@type": "Segment", 195 | "start": 121.65, 196 | "duration": 5.79, 197 | "bandwidth": "S", 198 | "speaker": { 199 | "@id": "S18", 200 | "gender": "M" 201 | } 202 | } 203 | ] 204 | } 205 | -------------------------------------------------------------------------------- /src/adapters/__tests__/fixtures/kaldi-2-transcription.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": { 3 | "version": "0.0.10" 4 | }, 5 | "text": 6 | "we tried to sell this as a critic and pristine and untouched and this looks like pictures but once you get here and you start to walk along the coast by you you get a completely other just last year we took thirty tonnes holes will return food wrapping bottles but the main part weight wise is equipment from from fisheries are lots and lots of pieces of rope someone cos someone obviously torn the international fishing fleet is operating offshore we clearly finds signs that the they contribute to this but still we we find from all over europe are some from across the atlantic i mean you can throw things into the ocean in florida and think where i threw it away and appear on our shores they rather quickly breaks down into smaller pieces and the even tiny little favours the coastline as homeless you can go there hear what what to say it's so obvious that what we are doing here is like the tip of the tip of the iceberg but it's the visible to the this is what is readily available we pick up this part this little piece of litter and it's gone down he won't go to the area", 7 | "punct": 8 | "We tried to sell this as a critic and pristine and untouched. And this looks like pictures, but once you get here and you start to walk along the coast by you. You get a completely other. Just last year. We took thirty tonnes holes will return food wrapping bottles. But the main part. Weight wise is equipment from. From fisheries are lots and lots of pieces of rope someone cos someone obviously torn the international fishing fleet is operating offshore. We clearly finds signs that the they contribute to this, but still we. We find from all over Europe are some from across the Atlantic. I mean. You can throw things into the ocean in Florida and think where I threw it away and appear on our shores. They rather quickly breaks down into smaller pieces and the even tiny little favours the coastline as homeless. You can go there. Hear what, what to say it's so obvious that what we are doing here is like the tip of the tip of the iceberg, but it's the visible to the. This is what is readily available. We pick up this part. This little piece of litter and it's gone down. He won't go to the area.", 9 | "words": [ 10 | { 11 | "start": 1.55, 12 | "confidence": 0.87, 13 | "end": 1.7, 14 | "word": "we", 15 | "punct": "We" 16 | }, 17 | { 18 | "start": 1.7, 19 | "confidence": 0.7, 20 | "end": 1.94, 21 | "word": "tried", 22 | "punct": "tried" 23 | }, 24 | { 25 | "start": 1.94, 26 | "confidence": 1, 27 | "end": 2.05, 28 | "word": "to", 29 | "punct": "to" 30 | }, 31 | { 32 | "start": 2.05, 33 | "confidence": 1, 34 | "end": 2.3, 35 | "word": "sell", 36 | "punct": "sell" 37 | }, 38 | { 39 | "start": 2.3, 40 | "confidence": 1, 41 | "end": 2.5, 42 | "word": "this", 43 | "punct": "this" 44 | }, 45 | { 46 | "start": 2.5, 47 | "confidence": 0.98, 48 | "end": 2.73, 49 | "word": "as", 50 | "punct": "as" 51 | }, 52 | { 53 | "start": 2.73, 54 | "confidence": 0.8, 55 | "end": 2.9, 56 | "word": "a", 57 | "punct": "a" 58 | }, 59 | { 60 | "start": 2.91, 61 | "confidence": 0.81, 62 | "end": 3.33, 63 | "word": "critic", 64 | "punct": "critic" 65 | }, 66 | { 67 | "start": 3.33, 68 | "confidence": 1, 69 | "end": 3.72, 70 | "word": "and", 71 | "punct": "and" 72 | }, 73 | { 74 | "start": 3.75, 75 | "confidence": 1, 76 | "end": 4.38, 77 | "word": "pristine", 78 | "punct": "pristine" 79 | }, 80 | { 81 | "start": 4.38, 82 | "confidence": 0.99, 83 | "end": 4.51, 84 | "word": "and", 85 | "punct": "and" 86 | }, 87 | { 88 | "start": 4.51, 89 | "confidence": 1, 90 | "end": 5.25, 91 | "word": "untouched", 92 | "punct": "untouched." 93 | }, 94 | { 95 | "start": 6.93, 96 | "confidence": 0.96, 97 | "end": 7.06, 98 | "word": "and", 99 | "punct": "And" 100 | }, 101 | { 102 | "start": 7.07, 103 | "confidence": 0.94, 104 | "end": 7.24, 105 | "word": "this", 106 | "punct": "this" 107 | }, 108 | { 109 | "start": 7.25, 110 | "confidence": 0.98, 111 | "end": 7.59, 112 | "word": "looks", 113 | "punct": "looks" 114 | }, 115 | { 116 | "start": 7.6, 117 | "confidence": 0.92, 118 | "end": 7.76, 119 | "word": "like", 120 | "punct": "like" 121 | }, 122 | { 123 | "start": 8.1, 124 | "confidence": 1, 125 | "end": 8.64, 126 | "word": "pictures", 127 | "punct": "pictures," 128 | }, 129 | { 130 | "start": 8.64, 131 | "confidence": 1, 132 | "end": 8.86, 133 | "word": "but", 134 | "punct": "but" 135 | }, 136 | { 137 | "start": 9.07, 138 | "confidence": 1, 139 | "end": 9.49, 140 | "word": "once", 141 | "punct": "once" 142 | }, 143 | { 144 | "start": 9.49, 145 | "confidence": 0.99, 146 | "end": 9.57, 147 | "word": "you", 148 | "punct": "you" 149 | }, 150 | { 151 | "start": 9.57, 152 | "confidence": 0.98, 153 | "end": 9.77, 154 | "word": "get", 155 | "punct": "get" 156 | }, 157 | { 158 | "start": 9.77, 159 | "confidence": 0.75, 160 | "end": 9.93, 161 | "word": "here", 162 | "punct": "here" 163 | }, 164 | { 165 | "start": 9.93, 166 | "confidence": 0.75, 167 | "end": 10.22, 168 | "word": "and", 169 | "punct": "and" 170 | }, 171 | { 172 | "start": 10.23, 173 | "confidence": 0.74, 174 | "end": 10.69, 175 | "word": "you", 176 | "punct": "you" 177 | }, 178 | { 179 | "start": 10.71, 180 | "confidence": 0.85, 181 | "end": 10.98, 182 | "word": "start", 183 | "punct": "start" 184 | }, 185 | { 186 | "start": 11, 187 | "confidence": 1, 188 | "end": 11.29, 189 | "word": "to", 190 | "punct": "to" 191 | }, 192 | { 193 | "start": 11.79, 194 | "confidence": 1, 195 | "end": 12.05, 196 | "word": "walk", 197 | "punct": "walk" 198 | }, 199 | { 200 | "start": 12.05, 201 | "confidence": 1, 202 | "end": 12.28, 203 | "word": "along", 204 | "punct": "along" 205 | }, 206 | { 207 | "start": 12.28, 208 | "confidence": 0.99, 209 | "end": 12.36, 210 | "word": "the", 211 | "punct": "the" 212 | }, 213 | { 214 | "start": 12.36, 215 | "confidence": 0.51, 216 | "end": 12.52, 217 | "word": "coast", 218 | "punct": "coast" 219 | }, 220 | { 221 | "start": 12.52, 222 | "confidence": 0.53, 223 | "end": 12.82, 224 | "word": "by", 225 | "punct": "by" 226 | }, 227 | { 228 | "start": 12.83, 229 | "confidence": 0.46, 230 | "end": 13.28, 231 | "word": "you", 232 | "punct": "you." 233 | }, 234 | { 235 | "start": 14.07, 236 | "confidence": 0.9, 237 | "end": 14.48, 238 | "word": "you", 239 | "punct": "You" 240 | }, 241 | { 242 | "start": 14.48, 243 | "confidence": 1, 244 | "end": 14.68, 245 | "word": "get", 246 | "punct": "get" 247 | }, 248 | { 249 | "start": 14.68, 250 | "confidence": 0.97, 251 | "end": 14.75, 252 | "word": "a", 253 | "punct": "a" 254 | }, 255 | { 256 | "start": 14.75, 257 | "confidence": 1, 258 | "end": 15.31, 259 | "word": "completely", 260 | "punct": "completely" 261 | }, 262 | { 263 | "start": 15.31, 264 | "confidence": 1, 265 | "end": 15.55, 266 | "word": "other", 267 | "punct": "other." 268 | }, 269 | { 270 | "start": 33.83, 271 | "confidence": 0.99, 272 | "end": 34.07, 273 | "word": "just", 274 | "punct": "Just" 275 | }, 276 | { 277 | "start": 34.07, 278 | "confidence": 0.99, 279 | "end": 34.39, 280 | "word": "last", 281 | "punct": "last" 282 | }, 283 | { 284 | "start": 34.4, 285 | "confidence": 0.88, 286 | "end": 34.58, 287 | "word": "year", 288 | "punct": "year." 289 | }, 290 | { 291 | "start": 34.68, 292 | "confidence": 0.99, 293 | "end": 34.94, 294 | "word": "we", 295 | "punct": "We" 296 | }, 297 | { 298 | "start": 35.39, 299 | "confidence": 0.34, 300 | "end": 35.63, 301 | "word": "took", 302 | "punct": "took" 303 | }, 304 | { 305 | "start": 35.77, 306 | "confidence": 0.97, 307 | "end": 36.18, 308 | "word": "thirty", 309 | "punct": "thirty" 310 | }, 311 | { 312 | "start": 36.19, 313 | "confidence": 0.47, 314 | "end": 36.75, 315 | "word": "tonnes", 316 | "punct": "tonnes" 317 | }, 318 | { 319 | "start": 38.28, 320 | "confidence": 0.43, 321 | "end": 38.54, 322 | "word": "holes", 323 | "punct": "holes" 324 | }, 325 | { 326 | "start": 39.02, 327 | "confidence": 0.69, 328 | "end": 39.27, 329 | "word": "will", 330 | "punct": "will" 331 | }, 332 | { 333 | "start": 39.67, 334 | "confidence": 0.97, 335 | "end": 40.24, 336 | "word": "return", 337 | "punct": "return" 338 | }, 339 | { 340 | "start": 40.79, 341 | "confidence": 1, 342 | "end": 41.25, 343 | "word": "food", 344 | "punct": "food" 345 | }, 346 | { 347 | "start": 41.25, 348 | "confidence": 0.96, 349 | "end": 41.97, 350 | "word": "wrapping", 351 | "punct": "wrapping" 352 | }, 353 | { 354 | "start": 42.78, 355 | "confidence": 1, 356 | "end": 43.41, 357 | "word": "bottles", 358 | "punct": "bottles." 359 | }, 360 | { 361 | "start": 45.16, 362 | "confidence": 0.57, 363 | "end": 45.25, 364 | "word": "but", 365 | "punct": "But" 366 | }, 367 | { 368 | "start": 45.33, 369 | "confidence": 0.94, 370 | "end": 45.55, 371 | "word": "the", 372 | "punct": "the" 373 | }, 374 | { 375 | "start": 45.59, 376 | "confidence": 1, 377 | "end": 46.02, 378 | "word": "main", 379 | "punct": "main" 380 | }, 381 | { 382 | "start": 46.02, 383 | "confidence": 0.99, 384 | "end": 46.34, 385 | "word": "part", 386 | "punct": "part." 387 | }, 388 | { 389 | "start": 46.53, 390 | "confidence": 0.59, 391 | "end": 46.94, 392 | "word": "weight", 393 | "punct": "Weight" 394 | }, 395 | { 396 | "start": 46.94, 397 | "confidence": 0.69, 398 | "end": 47.27, 399 | "word": "wise", 400 | "punct": "wise" 401 | }, 402 | { 403 | "start": 47.28, 404 | "confidence": 1, 405 | "end": 47.79, 406 | "word": "is", 407 | "punct": "is" 408 | }, 409 | { 410 | "start": 47.82, 411 | "confidence": 1, 412 | "end": 48.39, 413 | "word": "equipment", 414 | "punct": "equipment" 415 | }, 416 | { 417 | "start": 48.39, 418 | "confidence": 1, 419 | "end": 48.88, 420 | "word": "from", 421 | "punct": "from." 422 | }, 423 | { 424 | "start": 48.95, 425 | "confidence": 1, 426 | "end": 49.15, 427 | "word": "from", 428 | "punct": "From" 429 | }, 430 | { 431 | "start": 49.15, 432 | "confidence": 0.99, 433 | "end": 49.98, 434 | "word": "fisheries", 435 | "punct": "fisheries" 436 | }, 437 | { 438 | "start": 50.18, 439 | "confidence": 0.7, 440 | "end": 50.79, 441 | "word": "are", 442 | "punct": "are" 443 | }, 444 | { 445 | "start": 51.1, 446 | "confidence": 0.99, 447 | "end": 51.49, 448 | "word": "lots", 449 | "punct": "lots" 450 | }, 451 | { 452 | "start": 51.5, 453 | "confidence": 0.99, 454 | "end": 51.58, 455 | "word": "and", 456 | "punct": "and" 457 | }, 458 | { 459 | "start": 51.58, 460 | "confidence": 0.99, 461 | "end": 51.81, 462 | "word": "lots", 463 | "punct": "lots" 464 | }, 465 | { 466 | "start": 51.91, 467 | "confidence": 0.99, 468 | "end": 52.13, 469 | "word": "of", 470 | "punct": "of" 471 | }, 472 | { 473 | "start": 52.15, 474 | "confidence": 0.99, 475 | "end": 52.72, 476 | "word": "pieces", 477 | "punct": "pieces" 478 | }, 479 | { 480 | "start": 52.72, 481 | "confidence": 1, 482 | "end": 52.84, 483 | "word": "of", 484 | "punct": "of" 485 | }, 486 | { 487 | "start": 52.84, 488 | "confidence": 1, 489 | "end": 53.39, 490 | "word": "rope", 491 | "punct": "rope" 492 | }, 493 | { 494 | "start": 54.39, 495 | "confidence": 0.9, 496 | "end": 54.84, 497 | "word": "someone", 498 | "punct": "someone" 499 | }, 500 | { 501 | "start": 54.86, 502 | "confidence": 0.48, 503 | "end": 55.12, 504 | "word": "cos", 505 | "punct": "cos" 506 | }, 507 | { 508 | "start": 55.21, 509 | "confidence": 0.99, 510 | "end": 55.88, 511 | "word": "someone", 512 | "punct": "someone" 513 | }, 514 | { 515 | "start": 56.08, 516 | "confidence": 1, 517 | "end": 56.62, 518 | "word": "obviously", 519 | "punct": "obviously" 520 | }, 521 | { 522 | "start": 56.62, 523 | "confidence": 1, 524 | "end": 57.08, 525 | "word": "torn", 526 | "punct": "torn" 527 | }, 528 | { 529 | "start": 58.21, 530 | "confidence": 0.83, 531 | "end": 58.63, 532 | "word": "the", 533 | "punct": "the" 534 | }, 535 | { 536 | "start": 58.63, 537 | "confidence": 0.96, 538 | "end": 59.22, 539 | "word": "international", 540 | "punct": "international" 541 | }, 542 | { 543 | "start": 59.22, 544 | "confidence": 1, 545 | "end": 59.57, 546 | "word": "fishing", 547 | "punct": "fishing" 548 | }, 549 | { 550 | "start": 59.57, 551 | "confidence": 0.96, 552 | "end": 59.84, 553 | "word": "fleet", 554 | "punct": "fleet" 555 | }, 556 | { 557 | "start": 59.84, 558 | "confidence": 0.97, 559 | "end": 59.98, 560 | "word": "is", 561 | "punct": "is" 562 | }, 563 | { 564 | "start": 59.98, 565 | "confidence": 1, 566 | "end": 60.54, 567 | "word": "operating", 568 | "punct": "operating" 569 | }, 570 | { 571 | "start": 60.54, 572 | "confidence": 0.99, 573 | "end": 61.01, 574 | "word": "offshore", 575 | "punct": "offshore." 576 | }, 577 | { 578 | "start": 62.04, 579 | "confidence": 0.95, 580 | "end": 62.28, 581 | "word": "we", 582 | "punct": "We" 583 | }, 584 | { 585 | "start": 62.28, 586 | "confidence": 1, 587 | "end": 62.58, 588 | "word": "clearly", 589 | "punct": "clearly" 590 | }, 591 | { 592 | "start": 62.58, 593 | "confidence": 0.58, 594 | "end": 62.94, 595 | "word": "finds", 596 | "punct": "finds" 597 | }, 598 | { 599 | "start": 62.94, 600 | "confidence": 1, 601 | "end": 63.68, 602 | "word": "signs", 603 | "punct": "signs" 604 | }, 605 | { 606 | "start": 63.83, 607 | "confidence": 1, 608 | "end": 64.12, 609 | "word": "that", 610 | "punct": "that" 611 | }, 612 | { 613 | "start": 65.44, 614 | "confidence": 0.99, 615 | "end": 65.91, 616 | "word": "the", 617 | "punct": "the" 618 | }, 619 | { 620 | "start": 65.94, 621 | "confidence": 1, 622 | "end": 66.15, 623 | "word": "they", 624 | "punct": "they" 625 | }, 626 | { 627 | "start": 66.15, 628 | "confidence": 0.97, 629 | "end": 66.68, 630 | "word": "contribute", 631 | "punct": "contribute" 632 | }, 633 | { 634 | "start": 66.71, 635 | "confidence": 1, 636 | "end": 66.83, 637 | "word": "to", 638 | "punct": "to" 639 | }, 640 | { 641 | "start": 66.83, 642 | "confidence": 1, 643 | "end": 67.24, 644 | "word": "this", 645 | "punct": "this," 646 | }, 647 | { 648 | "start": 71.18, 649 | "confidence": 0.83, 650 | "end": 71.31, 651 | "word": "but", 652 | "punct": "but" 653 | }, 654 | { 655 | "start": 71.36, 656 | "confidence": 1, 657 | "end": 71.83, 658 | "word": "still", 659 | "punct": "still" 660 | }, 661 | { 662 | "start": 71.86, 663 | "confidence": 0.98, 664 | "end": 72.12, 665 | "word": "we", 666 | "punct": "we." 667 | }, 668 | { 669 | "start": 72.13, 670 | "confidence": 0.95, 671 | "end": 72.41, 672 | "word": "we", 673 | "punct": "We" 674 | }, 675 | { 676 | "start": 72.91, 677 | "confidence": 0.97, 678 | "end": 73.29, 679 | "word": "find", 680 | "punct": "find" 681 | }, 682 | { 683 | "start": 73.64, 684 | "confidence": 1, 685 | "end": 73.9, 686 | "word": "from", 687 | "punct": "from" 688 | }, 689 | { 690 | "start": 73.9, 691 | "confidence": 1, 692 | "end": 74.05, 693 | "word": "all", 694 | "punct": "all" 695 | }, 696 | { 697 | "start": 74.05, 698 | "confidence": 0.99, 699 | "end": 74.23, 700 | "word": "over", 701 | "punct": "over" 702 | }, 703 | { 704 | "start": 74.23, 705 | "confidence": 1, 706 | "end": 74.62, 707 | "word": "europe", 708 | "punct": "Europe" 709 | }, 710 | { 711 | "start": 74.66, 712 | "confidence": 0.72, 713 | "end": 75.46, 714 | "word": "are", 715 | "punct": "are" 716 | }, 717 | { 718 | "start": 75.85, 719 | "confidence": 0.72, 720 | "end": 76.22, 721 | "word": "some", 722 | "punct": "some" 723 | }, 724 | { 725 | "start": 76.23, 726 | "confidence": 1, 727 | "end": 76.51, 728 | "word": "from", 729 | "punct": "from" 730 | }, 731 | { 732 | "start": 76.51, 733 | "confidence": 1, 734 | "end": 76.84, 735 | "word": "across", 736 | "punct": "across" 737 | }, 738 | { 739 | "start": 76.84, 740 | "confidence": 1, 741 | "end": 76.92, 742 | "word": "the", 743 | "punct": "the" 744 | }, 745 | { 746 | "start": 76.92, 747 | "confidence": 1, 748 | "end": 77.56, 749 | "word": "atlantic", 750 | "punct": "Atlantic." 751 | }, 752 | { 753 | "start": 83.4, 754 | "confidence": 0.49, 755 | "end": 83.43, 756 | "word": "i", 757 | "punct": "I" 758 | }, 759 | { 760 | "start": 83.53, 761 | "confidence": 0.5, 762 | "end": 83.79, 763 | "word": "mean", 764 | "punct": "mean." 765 | }, 766 | { 767 | "start": 83.8, 768 | "confidence": 1, 769 | "end": 83.92, 770 | "word": "you", 771 | "punct": "You" 772 | }, 773 | { 774 | "start": 83.92, 775 | "confidence": 1, 776 | "end": 84.08, 777 | "word": "can", 778 | "punct": "can" 779 | }, 780 | { 781 | "start": 84.08, 782 | "confidence": 1, 783 | "end": 84.39, 784 | "word": "throw", 785 | "punct": "throw" 786 | }, 787 | { 788 | "start": 84.39, 789 | "confidence": 0.74, 790 | "end": 84.59, 791 | "word": "things", 792 | "punct": "things" 793 | }, 794 | { 795 | "start": 84.63, 796 | "confidence": 1, 797 | "end": 84.92, 798 | "word": "into", 799 | "punct": "into" 800 | }, 801 | { 802 | "start": 84.92, 803 | "confidence": 1, 804 | "end": 85.19, 805 | "word": "the", 806 | "punct": "the" 807 | }, 808 | { 809 | "start": 85.22, 810 | "confidence": 1, 811 | "end": 85.59, 812 | "word": "ocean", 813 | "punct": "ocean" 814 | }, 815 | { 816 | "start": 85.65, 817 | "confidence": 1, 818 | "end": 86.1, 819 | "word": "in", 820 | "punct": "in" 821 | }, 822 | { 823 | "start": 86.13, 824 | "confidence": 0.99, 825 | "end": 86.83, 826 | "word": "florida", 827 | "punct": "Florida" 828 | }, 829 | { 830 | "start": 86.85, 831 | "confidence": 0.81, 832 | "end": 87.02, 833 | "word": "and", 834 | "punct": "and" 835 | }, 836 | { 837 | "start": 87.03, 838 | "confidence": 0.45, 839 | "end": 87.25, 840 | "word": "think", 841 | "punct": "think" 842 | }, 843 | { 844 | "start": 87.28, 845 | "confidence": 0.52, 846 | "end": 87.58, 847 | "word": "where", 848 | "punct": "where" 849 | }, 850 | { 851 | "start": 87.58, 852 | "confidence": 0.7, 853 | "end": 87.78, 854 | "word": "i", 855 | "punct": "I" 856 | }, 857 | { 858 | "start": 87.77, 859 | "confidence": 0.41, 860 | "end": 88.02, 861 | "word": "threw", 862 | "punct": "threw" 863 | }, 864 | { 865 | "start": 88.03, 866 | "confidence": 0.56, 867 | "end": 88.19, 868 | "word": "it", 869 | "punct": "it" 870 | }, 871 | { 872 | "start": 88.18, 873 | "confidence": 1, 874 | "end": 88.58, 875 | "word": "away", 876 | "punct": "away" 877 | }, 878 | { 879 | "start": 89.87, 880 | "confidence": 0.85, 881 | "end": 90.05, 882 | "word": "and", 883 | "punct": "and" 884 | }, 885 | { 886 | "start": 90.05, 887 | "confidence": 0.79, 888 | "end": 90.41, 889 | "word": "appear", 890 | "punct": "appear" 891 | }, 892 | { 893 | "start": 90.7, 894 | "confidence": 0.65, 895 | "end": 90.84, 896 | "word": "on", 897 | "punct": "on" 898 | }, 899 | { 900 | "start": 90.93, 901 | "confidence": 0.73, 902 | "end": 91.17, 903 | "word": "our", 904 | "punct": "our" 905 | }, 906 | { 907 | "start": 91.17, 908 | "confidence": 0.74, 909 | "end": 91.51, 910 | "word": "shores", 911 | "punct": "shores." 912 | }, 913 | { 914 | "start": 92.3, 915 | "confidence": 0.71, 916 | "end": 92.54, 917 | "word": "they", 918 | "punct": "They" 919 | }, 920 | { 921 | "start": 92.59, 922 | "confidence": 1, 923 | "end": 92.9, 924 | "word": "rather", 925 | "punct": "rather" 926 | }, 927 | { 928 | "start": 92.9, 929 | "confidence": 1, 930 | "end": 93.68, 931 | "word": "quickly", 932 | "punct": "quickly" 933 | }, 934 | { 935 | "start": 94.19, 936 | "confidence": 0.82, 937 | "end": 94.49, 938 | "word": "breaks", 939 | "punct": "breaks" 940 | }, 941 | { 942 | "start": 94.5, 943 | "confidence": 0.99, 944 | "end": 94.78, 945 | "word": "down", 946 | "punct": "down" 947 | }, 948 | { 949 | "start": 94.78, 950 | "confidence": 1, 951 | "end": 95.03, 952 | "word": "into", 953 | "punct": "into" 954 | }, 955 | { 956 | "start": 95.03, 957 | "confidence": 0.98, 958 | "end": 95.38, 959 | "word": "smaller", 960 | "punct": "smaller" 961 | }, 962 | { 963 | "start": 95.38, 964 | "confidence": 1, 965 | "end": 95.97, 966 | "word": "pieces", 967 | "punct": "pieces" 968 | }, 969 | { 970 | "start": 95.97, 971 | "confidence": 0.98, 972 | "end": 96.16, 973 | "word": "and", 974 | "punct": "and" 975 | }, 976 | { 977 | "start": 96.16, 978 | "confidence": 0.63, 979 | "end": 96.26, 980 | "word": "the", 981 | "punct": "the" 982 | }, 983 | { 984 | "start": 96.26, 985 | "confidence": 0.41, 986 | "end": 96.73, 987 | "word": "even", 988 | "punct": "even" 989 | }, 990 | { 991 | "start": 96.78, 992 | "confidence": 0.9, 993 | "end": 97.1, 994 | "word": "tiny", 995 | "punct": "tiny" 996 | }, 997 | { 998 | "start": 97.11, 999 | "confidence": 0.91, 1000 | "end": 97.38, 1001 | "word": "little", 1002 | "punct": "little" 1003 | }, 1004 | { 1005 | "start": 97.39, 1006 | "confidence": 0.78, 1007 | "end": 98.08, 1008 | "word": "favours", 1009 | "punct": "favours" 1010 | }, 1011 | { 1012 | "start": 100.75, 1013 | "confidence": 0.99, 1014 | "end": 100.93, 1015 | "word": "the", 1016 | "punct": "the" 1017 | }, 1018 | { 1019 | "start": 100.94, 1020 | "confidence": 0.93, 1021 | "end": 101.46, 1022 | "word": "coastline", 1023 | "punct": "coastline" 1024 | }, 1025 | { 1026 | "start": 101.47, 1027 | "confidence": 0.46, 1028 | "end": 101.61, 1029 | "word": "as", 1030 | "punct": "as" 1031 | }, 1032 | { 1033 | "start": 101.63, 1034 | "confidence": 0.3, 1035 | "end": 102.18, 1036 | "word": "homeless", 1037 | "punct": "homeless." 1038 | }, 1039 | { 1040 | "start": 102.85, 1041 | "confidence": 0.99, 1042 | "end": 103.1, 1043 | "word": "you", 1044 | "punct": "You" 1045 | }, 1046 | { 1047 | "start": 103.1, 1048 | "confidence": 1, 1049 | "end": 103.35, 1050 | "word": "can", 1051 | "punct": "can" 1052 | }, 1053 | { 1054 | "start": 103.42, 1055 | "confidence": 0.66, 1056 | "end": 103.66, 1057 | "word": "go", 1058 | "punct": "go" 1059 | }, 1060 | { 1061 | "start": 103.84, 1062 | "confidence": 0.59, 1063 | "end": 104.37, 1064 | "word": "there", 1065 | "punct": "there." 1066 | }, 1067 | { 1068 | "start": 108.76, 1069 | "confidence": 0.48, 1070 | "end": 108.9, 1071 | "word": "hear", 1072 | "punct": "Hear" 1073 | }, 1074 | { 1075 | "start": 108.97, 1076 | "confidence": 0.79, 1077 | "end": 109.18, 1078 | "word": "what", 1079 | "punct": "what," 1080 | }, 1081 | { 1082 | "start": 109.22, 1083 | "confidence": 0.93, 1084 | "end": 109.47, 1085 | "word": "what", 1086 | "punct": "what" 1087 | }, 1088 | { 1089 | "start": 109.47, 1090 | "confidence": 1, 1091 | "end": 109.61, 1092 | "word": "to", 1093 | "punct": "to" 1094 | }, 1095 | { 1096 | "start": 109.61, 1097 | "confidence": 1, 1098 | "end": 109.94, 1099 | "word": "say", 1100 | "punct": "say" 1101 | }, 1102 | { 1103 | "start": 110.2, 1104 | "confidence": 0.81, 1105 | "end": 110.88, 1106 | "word": "it's", 1107 | "punct": "it's" 1108 | }, 1109 | { 1110 | "start": 110.91, 1111 | "confidence": 1, 1112 | "end": 111.12, 1113 | "word": "so", 1114 | "punct": "so" 1115 | }, 1116 | { 1117 | "start": 111.12, 1118 | "confidence": 1, 1119 | "end": 111.56, 1120 | "word": "obvious", 1121 | "punct": "obvious" 1122 | }, 1123 | { 1124 | "start": 111.56, 1125 | "confidence": 1, 1126 | "end": 111.77, 1127 | "word": "that", 1128 | "punct": "that" 1129 | }, 1130 | { 1131 | "start": 111.77, 1132 | "confidence": 1, 1133 | "end": 111.94, 1134 | "word": "what", 1135 | "punct": "what" 1136 | }, 1137 | { 1138 | "start": 111.94, 1139 | "confidence": 1, 1140 | "end": 112.13, 1141 | "word": "we", 1142 | "punct": "we" 1143 | }, 1144 | { 1145 | "start": 112.13, 1146 | "confidence": 1, 1147 | "end": 112.22, 1148 | "word": "are", 1149 | "punct": "are" 1150 | }, 1151 | { 1152 | "start": 112.22, 1153 | "confidence": 1, 1154 | "end": 112.49, 1155 | "word": "doing", 1156 | "punct": "doing" 1157 | }, 1158 | { 1159 | "start": 112.49, 1160 | "confidence": 1, 1161 | "end": 112.77, 1162 | "word": "here", 1163 | "punct": "here" 1164 | }, 1165 | { 1166 | "start": 112.77, 1167 | "confidence": 1, 1168 | "end": 113.02, 1169 | "word": "is", 1170 | "punct": "is" 1171 | }, 1172 | { 1173 | "start": 113.19, 1174 | "confidence": 1, 1175 | "end": 113.43, 1176 | "word": "like", 1177 | "punct": "like" 1178 | }, 1179 | { 1180 | "start": 113.43, 1181 | "confidence": 1, 1182 | "end": 113.52, 1183 | "word": "the", 1184 | "punct": "the" 1185 | }, 1186 | { 1187 | "start": 113.52, 1188 | "confidence": 1, 1189 | "end": 113.75, 1190 | "word": "tip", 1191 | "punct": "tip" 1192 | }, 1193 | { 1194 | "start": 113.75, 1195 | "confidence": 1, 1196 | "end": 113.85, 1197 | "word": "of", 1198 | "punct": "of" 1199 | }, 1200 | { 1201 | "start": 113.85, 1202 | "confidence": 1, 1203 | "end": 113.95, 1204 | "word": "the", 1205 | "punct": "the" 1206 | }, 1207 | { 1208 | "start": 113.95, 1209 | "confidence": 1, 1210 | "end": 114.19, 1211 | "word": "tip", 1212 | "punct": "tip" 1213 | }, 1214 | { 1215 | "start": 114.19, 1216 | "confidence": 1, 1217 | "end": 114.39, 1218 | "word": "of", 1219 | "punct": "of" 1220 | }, 1221 | { 1222 | "start": 114.39, 1223 | "confidence": 1, 1224 | "end": 114.51, 1225 | "word": "the", 1226 | "punct": "the" 1227 | }, 1228 | { 1229 | "start": 114.51, 1230 | "confidence": 1, 1231 | "end": 115.11, 1232 | "word": "iceberg", 1233 | "punct": "iceberg," 1234 | }, 1235 | { 1236 | "start": 115.86, 1237 | "confidence": 1, 1238 | "end": 116.02, 1239 | "word": "but", 1240 | "punct": "but" 1241 | }, 1242 | { 1243 | "start": 116.02, 1244 | "confidence": 0.89, 1245 | "end": 116.24, 1246 | "word": "it's", 1247 | "punct": "it's" 1248 | }, 1249 | { 1250 | "start": 116.24, 1251 | "confidence": 1, 1252 | "end": 116.39, 1253 | "word": "the", 1254 | "punct": "the" 1255 | }, 1256 | { 1257 | "start": 116.39, 1258 | "confidence": 0.92, 1259 | "end": 116.82, 1260 | "word": "visible", 1261 | "punct": "visible" 1262 | }, 1263 | { 1264 | "start": 116.82, 1265 | "confidence": 0.87, 1266 | "end": 117.05, 1267 | "word": "to", 1268 | "punct": "to" 1269 | }, 1270 | { 1271 | "start": 117.1, 1272 | "confidence": 0.62, 1273 | "end": 117.56, 1274 | "word": "the", 1275 | "punct": "the." 1276 | }, 1277 | { 1278 | "start": 117.58, 1279 | "confidence": 1, 1280 | "end": 117.92, 1281 | "word": "this", 1282 | "punct": "This" 1283 | }, 1284 | { 1285 | "start": 117.92, 1286 | "confidence": 1, 1287 | "end": 118.12, 1288 | "word": "is", 1289 | "punct": "is" 1290 | }, 1291 | { 1292 | "start": 118.12, 1293 | "confidence": 1, 1294 | "end": 118.35, 1295 | "word": "what", 1296 | "punct": "what" 1297 | }, 1298 | { 1299 | "start": 118.39, 1300 | "confidence": 0.94, 1301 | "end": 118.76, 1302 | "word": "is", 1303 | "punct": "is" 1304 | }, 1305 | { 1306 | "start": 118.78, 1307 | "confidence": 1, 1308 | "end": 119.25, 1309 | "word": "readily", 1310 | "punct": "readily" 1311 | }, 1312 | { 1313 | "start": 119.25, 1314 | "confidence": 1, 1315 | "end": 119.91, 1316 | "word": "available", 1317 | "punct": "available." 1318 | }, 1319 | { 1320 | "start": 121.89, 1321 | "confidence": 0.84, 1322 | "end": 122.15, 1323 | "word": "we", 1324 | "punct": "We" 1325 | }, 1326 | { 1327 | "start": 122.2, 1328 | "confidence": 0.82, 1329 | "end": 122.5, 1330 | "word": "pick", 1331 | "punct": "pick" 1332 | }, 1333 | { 1334 | "start": 122.49, 1335 | "confidence": 0.98, 1336 | "end": 122.61, 1337 | "word": "up", 1338 | "punct": "up" 1339 | }, 1340 | { 1341 | "start": 122.61, 1342 | "confidence": 1, 1343 | "end": 122.82, 1344 | "word": "this", 1345 | "punct": "this" 1346 | }, 1347 | { 1348 | "start": 122.82, 1349 | "confidence": 0.4, 1350 | "end": 123.08, 1351 | "word": "part", 1352 | "punct": "part." 1353 | }, 1354 | { 1355 | "start": 123.23, 1356 | "confidence": 1, 1357 | "end": 123.51, 1358 | "word": "this", 1359 | "punct": "This" 1360 | }, 1361 | { 1362 | "start": 123.51, 1363 | "confidence": 1, 1364 | "end": 123.74, 1365 | "word": "little", 1366 | "punct": "little" 1367 | }, 1368 | { 1369 | "start": 123.74, 1370 | "confidence": 1, 1371 | "end": 124, 1372 | "word": "piece", 1373 | "punct": "piece" 1374 | }, 1375 | { 1376 | "start": 124, 1377 | "confidence": 0.99, 1378 | "end": 124.08, 1379 | "word": "of", 1380 | "punct": "of" 1381 | }, 1382 | { 1383 | "start": 124.08, 1384 | "confidence": 1, 1385 | "end": 124.4, 1386 | "word": "litter", 1387 | "punct": "litter" 1388 | }, 1389 | { 1390 | "start": 124.53, 1391 | "confidence": 0.99, 1392 | "end": 124.65, 1393 | "word": "and", 1394 | "punct": "and" 1395 | }, 1396 | { 1397 | "start": 124.65, 1398 | "confidence": 1, 1399 | "end": 124.83, 1400 | "word": "it's", 1401 | "punct": "it's" 1402 | }, 1403 | { 1404 | "start": 124.83, 1405 | "confidence": 1, 1406 | "end": 125.26, 1407 | "word": "gone", 1408 | "punct": "gone" 1409 | }, 1410 | { 1411 | "start": 125.54, 1412 | "confidence": 0.99, 1413 | "end": 125.84, 1414 | "word": "down", 1415 | "punct": "down." 1416 | }, 1417 | { 1418 | "start": 125.84, 1419 | "confidence": 0.42, 1420 | "end": 125.93, 1421 | "word": "he", 1422 | "punct": "He" 1423 | }, 1424 | { 1425 | "start": 125.94, 1426 | "confidence": 0.71, 1427 | "end": 126.15, 1428 | "word": "won't", 1429 | "punct": "won't" 1430 | }, 1431 | { 1432 | "start": 126.15, 1433 | "confidence": 0.76, 1434 | "end": 126.55, 1435 | "word": "go", 1436 | "punct": "go" 1437 | }, 1438 | { 1439 | "start": 126.62, 1440 | "confidence": 0.82, 1441 | "end": 126.76, 1442 | "word": "to", 1443 | "punct": "to" 1444 | }, 1445 | { 1446 | "start": 126.76, 1447 | "confidence": 0.89, 1448 | "end": 126.91, 1449 | "word": "the", 1450 | "punct": "the" 1451 | }, 1452 | { 1453 | "start": 126.91, 1454 | "confidence": 0.68, 1455 | "end": 127.21, 1456 | "word": "area", 1457 | "punct": "area." 1458 | } 1459 | ] 1460 | } 1461 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | import Transcript from './Transcript'; 2 | import TranscriptSegment from './TranscriptSegment'; 3 | import TranscriptWord from './TranscriptWord'; 4 | import Speaker from './Speaker'; 5 | 6 | export { 7 | Transcript, 8 | TranscriptSegment, 9 | TranscriptWord, 10 | Speaker, 11 | }; 12 | --------------------------------------------------------------------------------