toSrt(): max amount of words per SRT item instead of using the utterances array #308
-
Good Day! Is there a way to get the SRT items based on a maximum amount of characters or words, instead of using the utterances? Thanks for any hint! Best, Carsten |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @carstenschaefer, what programming language / SDK are you working with? We have some support for this in Python and Node SDKs. For instance, the Python SDK has a
Then setting a maximum number of 15 words returns results like:
Versus 4 words:
A note that if your response does not include utterances (i.e. you're using We don't have a way to set a character-length limit, but you could achieve a similar result fairly easily by hacking/extending the SDK. |
Beta Was this translation helpful? Give feedback.
Hi @carstenschaefer, what programming language / SDK are you working with? We have some support for this in Python and Node SDKs. For instance, the Python SDK has a
line_length
parameter in theto_SRT()
andto_WebVTT()
methods, which still uses utterances if available, but then splits the utterances by a maximum number of words in the line length. For instance:Then setting a maximum number of 15 words returns results …