Keep speaker text together #106
-
I'm using the tutorial for diarization and I'm able to get output that mimics theirs example:
I'm new to jq and this, but how would I change
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @randwvb, There are probably different ways to do this. The current format is building each line off of each "utterances": [
{
"start": 10.345,
"end": 13.785,
"confidence": 0.89388895,
"channel": 0,
"transcript": "Well, can't remembered I logged in. So I'm already in the room.",
"words": [ ...
],
"speaker": 0,
"id": "ff42479c-decb-49fd-b0d2-9a05d519cba8"
}, Each utterance is created based on natural pauses in the flow of the speaker's speech. They aren't determined by the speaker/diarization. So to build the jq output to show it in the format you want, some extra work will have to be done to the response. Here is one way to do it:
This code is using The best way to learn jq is to play around with it in the jq sandbox. That's how I figured out this answer. You might find a better way to do it! There is documentation at https://stedolan.github.io/jq/. I hope this was helpful to you! |
Beta Was this translation helpful? Give feedback.
Hi @randwvb,
There are probably different ways to do this. The current format is building each line off of each
utterance
. If you look at the response object, you can see that there is an utterances array with objects for each utterance:Each utterance is created based on natural pauses in the flow of the speaker's speech. They aren't determined by the speaker/diarizat…