Mux v3.1.0 Mux.Video.TranscriptionVocabularies View Source

This module provides functions around managing transcription vocabularies in Mux Video. Transcription vocabularies allow you to provide collections of phrases like proper nouns, technical jargon, and uncommon words as part of captioning workflows. API Documentation.

Link to this section Summary

Functions

Create a new transcription vocabulary. API Documentation

List transcription vocabularies. API Documentation

Updates a transcription vocabulary

Link to this section Functions

Create a new transcription vocabulary. API Documentation

Returns {:ok, transcription_vocabulary, raw_env}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, transcription_vocabulary, _env} = Mux.Video.TranscriptionVocabularies.create(client, %{name: "API Vocabulary", phrases: ["Mux", "Live Stream", "Playback ID"]})
iex> transcription_vocabulary
%{"created_at" => "1657242248", "id" => "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", "name" => "API Vocabulary", "phrases" => ["Mux", "Live Stream", "Playback ID"], "updated_at" => "1657242248"}
Link to this function

delete(client, transcription_vocabulary_id)

View Source

Delete a transcription vocabulary. API Documentation

Returns {:ok, "", raw_env}.

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {status, "", _env} = Mux.Video.TranscriptionVocabularies.delete(client, "RjFsousKxDrwqqGtwuLIAzrmtCb016fTK")
iex> status
:ok
Link to this function

get(client, transcription_vocabulary_id, options \\ [])

View Source

Retrieve a transcription vocabulary by ID. API Documentation

Returns a tuple such as {:ok, transcription_vocabulary, %Telsa.Env{}}

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, transcription_vocabulary, _env} = Mux.Video.TranscriptionVocabularies.get(client, "RjFsousKxDrwqqGtwuLIAzrmtCb016fTK")
iex> transcription_vocabulary
%{"created_at" => "1657242248", "id" => "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", "name" => "API Vocabulary", "phrases" => ["Mux", "Live Stream", "Playback ID"], "updated_at" => "1657242248"}
Link to this function

list(client, params \\ [])

View Source

List transcription vocabularies. API Documentation

Returns a tuple such as {:ok, transcription_vocabularies, %Telsa.Env{}}

Examples

iex> client = Mux.Base.new("my_token_id", "my_token_secret")
iex> {:ok, transcription_vocabularies, _env} = Mux.Video.TranscriptionVocabularies.list(client)
iex> transcription_vocabularies
[%{"created_at" => "1657242248", "id" => "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", "name" => "API Vocabulary", "phrases" => ["Mux", "Live Stream", "Playback ID"], "updated_at" => "1657242248"}, %{"created_at" => "1657242248", "id" => "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", "name" => "New API Vocabulary", "phrases" => ["Mux", "Live Stream", "Playback ID", "New phrase"], "updated_at" => "1657242420"}]
Link to this function

update(client, transcription_vocabulary_id, params)

View Source

Updates a transcription vocabulary

Returns a tuple such as `{:ok, transcription_vocabulary, %Tesla.Env{}} ## Examples iex> client = Mux.Base.new("my_token_id", "my_token_secret") iex> {:ok, transcription_vocabulary, _env} = Mux.Video.TranscriptionVocabularies.update(client, "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", %{name: "New API Vocabulary", phrases: ["Mux", "Live Stream", "Playback ID", "New phrase"]}) iex> transcription_vocabulary %{"created_at" => "1657242248", "id" => "ANZLqMO4E01TQW01SyFJfrdZzvjMVuyYqE", "name" => "New API Vocabulary", "phrases" => ["Mux", "Live Stream", "Playback ID", "New phrase"], "updated_at" => "1657242420"}