BoldTranscriptsEx.Convert (bold_transcripts_ex v0.7.0)
Summary
Functions
Converts a chapters WebVTT file to a text with one chapter per line and a short timestamp.
Converts a transcript from a specific service to Bold format.
Converts a text with one chapter per row into a WebVTT file.
Functions
Converts a chapters WebVTT file to a text with one chapter per line and a short timestamp.
Example
iex> Convert.chapters_webvtt_to_text("""
...> WEBVTT
...>
...> 1
...> 00:00:00.000 --> 00:00:37.000
...> Hello World
...>
...> 2
...> 00:00:37.000 --> 00:01:59.000
...> Introduction
...> """)
"00:00 Hello World\n00:37 Introduction"
Converts a transcript from a specific service to Bold format.
Parameters
service: The service that generated the transcript (e.g.,:assemblyai,:deepgram)transcript_data: The JSON string or decoded map of the transcript dataopts: Options for the conversion::language: (required for Deepgram) The language code of the transcript (e.g., "en", "lt")- Other service-specific options
Returns
{:ok, data}: A tuple with:okatom and the data in Bold Transcript format{:error, reason}: If the conversion fails or required options are missing
Converts a text with one chapter per row into a WebVTT file.
Example
iex> Convert.text_to_chapters_webvtt("""
...> 00:00 Hello World
...> 01:59 The End
...> """, 155)
"WEBVTT\n\n1\n00:00:00.000 --> 00:01:59.000\nHello World\n\n2\n00:01:59.000 --> 00:02:35.000\nThe End\n\n"