Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/features-list.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ Import Transcript Json - Adapters
- [x] BBC Kaldi
- [x] News Labs API - BBC Kaldi
- [x] autoEdit 2
- [x] AWS Transcriber
- [ ] Gentle Transcription
- [ ] Gentle Alignment Json
- [ ] IBM Watson STT
Expand Down
4 changes: 3 additions & 1 deletion docs/guides/adapters.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ checkout [a quick side note on how the DraftJS `block`, `entityRanges` and `enti
In your branch

- [ ] Create a folder with the name of the STT service - eg `speechmatics`
- [ ] add a `adapters/${sttServiceName}/sample` folder
- [ ] add a `src/lib/Util/adapters/${sttServiceName}/sample` folder
- [ ] add a sample json file from the STT service in this last folder - this will be useful for testing. Name it `${name of the stt service}.sample.json`
<!-- TODO: we should check these json are excluded from the bundle -->
- [ ] add option in [adapters/index.js](adapters/index.js)
Expand Down Expand Up @@ -107,6 +107,8 @@ This project uses jest. and once you submit the PR the tests are run by TravisCI

In order to write your tests, you want to have a `sample` folder with transcript data from stt and expected draftJs data output with file extensions `.sample.json` and `.sample.js` - see `bbc-kaldi` and `autoEdit2` example. This is so that those stub/example files are not bundled with the component when packaging for npm.

You can create and run your `example-usage.js` file and save the output json. This can be used to create the `.sample.js` file for the main test.

_If you don't have much experience with automated testing don't let this put you off tho, feel free to raise it as an issue and we can help out._

**top tip**: the draftJs block key attributes are randomly generated, and therefore cannot be tested in a deterministic way. However there is a well established workaround, you can replace them in the json with a type definition. eg instead of expecting it to be a specific number, you just expect it to be a string.
Expand Down
Loading