> For the complete documentation index, see [llms.txt](https://autoedit.gitbook.io/documentation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://autoedit.gitbook.io/documentation/master-1.0.13-1/transcriptions/transcriptions-intro/transcriptions.md).

# Transcription json

## Component/part description

In this section we are looking at the Transcription JSON schema used in autoEdit.

## Related projects.

Connected to this is defining a schema for transcription, to make sure all components that work with this have a defined interface/specification. Eg [BBC Transcript model](https://github.com/bbc/transcript-model)

### Gentle - json

[See appendix for json](/documentation/master-1.0.13-1/appendix-data-structures/gentle-json-transcription-specs.md) example.

### IBM - Json

[See appendix for json](/documentation/master-1.0.13-1/appendix-data-structures/ibm-watson-json-specs.md) example. As well as their [stt api reference](https://www.ibm.com/watson/developercloud/speech-to-text/api/v1/) and documentation.

### Pocketsphinx  - plain text

[See appendix for example](/documentation/master-1.0.13-1/appendix-data-structures/pocketsphinx-results.md) pocketsphinx plain text.

## Implementations Options considered

### Other

An array of words object, to represent lines this could also be a nested array of word objects.

Where the word object at a minimum as a start, end time and text attribute.

### BBC Transcription Model

considered the [bbc/transcript-model](https://github.com/bbc/transcript-model) to make use of [bbc/transcript-editor](https://github.com/bbc/transcript-editor) React component, built on top of Draft.js to improve the word correction feature.&#x20;

However  the blocker for now is that changing the data structure for transcription at this stage would involve a pretty substantial refactor.&#x20;

{% embed url="<https://trello.com/c/w3MH2HUi>" %}

{% embed url="<https://trello.com/c/3f35GNS2>" %}

## Current implementation

### Transcription domain

autoEdit JSON Transcription schema at a high level it models the objects present in a transcription.

![Transcription modelling diagram](https://440779116-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LKEQtUEJT5OEtyEbMfm%2F-LKESXcFA1aAsli3q3WF%2F-LKES_wU1YbJT0EW_iOH%2FTranscription%20modelling.png?generation=1534636483127889\&alt=media)

In this representation:

* Transcription&#x20;
  * Paragraphs  ← speaker&#x20;
    * Lines&#x20;
      * Words&#x20;

Speakers are associated to paragraphs. Paragraphs are treated as sections of lines.

A list of speakers can also be kept separate, similarly to how IBM Watson stt API returns the results of speaker diarization.

[See Appendix for autoEdit json schema example](/documentation/master-1.0.13-1/appendix-data-structures/autoedit-transcription-json.md).

## What needs refactoring

Name of `paragraph` and `line` attribute are ambiguos. It should be `lines` and `words` instead(?).

### replace array with hash

This is a bigger refactoring but instead of array data structure, could use hash/dictionary.

This way id is the key. and can make use of `key` `value` methods available in js. Lookup speed would improve(?) and could easily get array of values using js method.&#x20;
