(bytes->floats bs)
(default-mono-format)
(downsample bs from-sample-rate to-sample-rate)
Convert the sound samples, bs
from from-sample-rate
to to-sample-rate
.
The sound samples must be pcmf32.
Convert the sound samples, `bs` from `from-sample-rate` to `to-sample-rate`. The sound samples must be pcmf32.
(pcms16->pcmf32 bs)
Convert a byte array of PCM signed shorts, return a byte array of pcm signed 32 bit floats.
Convert a byte array of PCM signed shorts, return a byte array of pcm signed 32 bit floats.
(record-and-transcribe model-path)
Starts recording audio from the default system microphone.
Returns a function that will stop recording and return the transcribed text when called.
Starts recording audio from the default system microphone. Returns a function that will stop recording and return the transcribed text when called.
(record-audio)
(record-audio opts)
Records audio from the default microphone.
Returns a function that will stop recording and return the recorded audio as a byte array in pcmf32 with a sample rate of 44100.
Records audio from the default microphone. Returns a function that will stop recording and return the recorded audio as a byte array in pcmf32 with a sample rate of 44100.
(transcribe model-path bs)
Given a model-path
to a whisper model and a byte array of
sound samples, return a string with the transcribed text.
The sounds samples must be in pcm signed 32 bit float format with a sampling rate of 16,000.
Given a `model-path` to a whisper model and a byte array of sound samples, return a string with the transcribed text. The sounds samples must be in pcm signed 32 bit float format with a sampling rate of 16,000.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close