Digital Paper Edit adapter returns word timings as strings rather then numbers/float.
pietrop opened this issue · 1 comments
pietrop commented
Describe the bug
Digital Paper Edit adapter returns word timings as strings rather then numbers/float.
To Reproduce
Steps to reproduce the behavior:
- Go to demo app
- Click on load a speechmatics transcript
- add media from local media or url
- click on export transcript as
digital-paper-edit
- See error
Expected behavior
Expecting start and end attribute to be numbers
"words": [
{
"text": "On",
"start": 0.96,
"end": 1.08,
"id": 0
},
{
"text": "one",
"start": 1.08,
"end": 1.23,
"id": 1
},
{
"text": "hand",
"start": 1.23,
"end": 1.44,
"id": 2
},
...
Instead they are strings
{
"words": [
{
"id": 0,
"start": "0.96",
"end": "1.08",
"text": "On"
},
{
"id": 1,
"start": "1.08",
"end": "1.23",
"text": "one"
},
...
Additional context
NA
pietrop commented
seems like in speechmatics the start
and end
time attribute are strings.
...
{
"start": "13.23",
"end": "13.41",
"confidence": "0.990",
"word": "was",
"punct": "was",
"index": 1
},
...
So it might need to parse those as floats.
As well as not casting them back to string, eg here