Skip to content

Transform audio recordings to embeddings

Usage

talkText(
  talk_filepaths = talk_filepaths,
  model = "openai/whisper-small",
  device = "cpu",
  tokenizer_parallelism = FALSE,
  hg_gated = FALSE,
  hg_token = "",
  trust_remote_code = FALSE,
  logging_level = "warning"
)

Arguments

talk_filepaths

(string) Path to a video file (.wav/) list of audio filepaths, each is embedded separately

model

shortcut name for Hugging Face pretained model. Full list https://huggingface.co/transformers/pretrained_models.html

device

(string) name of device: 'cpu', 'gpu', or 'gpu:k' where k is a specific device number

tokenizer_parallelism

(boolean) whether to use device parallelization during tokenization.

hg_gated

(boolean) Set to True if the model is gated

hg_token

(string) The token to access the gated model got in huggingface website

trust_remote_code

(boolean) use a model with custom code on the Huggingface Hub.

logging_level

(string) Set logging level, options: "critical", "error", "warning", "info", "debug".

Value

A tibble with transcriptions.

See also

talkText.

Examples

# Transform audio recordings in text:
# voice_data (included in talk-package), to embeddings.
if (FALSE) { # \dontrun{
wav_path <- system.file("extdata/",
"test_short.wav",
package = "talk")
# Get transcription
talk_embeddings <- talkText(
wav_path
)
talk_embeddings
} # }

GitHub