Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.speech.voices

Reference clips somebody brought: the voices Vis did not ship.

pocket-tts clones a RECORDING instead of selecting a baked speaker, so a voice in that engine IS a WAV file - which means a voice is something a person can make and hand to Vis, and no licence anywhere can stop them. This namespace is where such a clip lives: checked and normalized once on the way in, listed beside the clips the bundle carries, and readable by id from every surface (CLI, gateway, app).

Imported clips deliberately do NOT live under the models directory. An asset is something Vis can fetch again; a recording is the user's own, and clearing a model cache must never take somebody's voice with it.

Reference clips somebody brought: the voices Vis did not ship.

pocket-tts clones a RECORDING instead of selecting a baked speaker, so a
voice in that engine IS a WAV file - which means a voice is something a
person can make and hand to Vis, and no licence anywhere can stop them. This
namespace is where such a clip lives: checked and normalized once on the way
in, listed beside the clips the bundle carries, and readable by id from every
surface (CLI, gateway, app).

Imported clips deliberately do NOT live under the models directory. An asset
is something Vis can fetch again; a recording is the user's own, and clearing
a model cache must never take somebody's voice with it.
raw docstring

decode-wavclj

(decode-wav file)

A 16-bit PCM RIFF/WAVE file as {:sample-rate :channels :samples}, where :samples is the interleaved short array. Chunks are walked rather than assumed at offset 36: a recorder that writes LIST or fact before data is still an ordinary WAV file.

A 16-bit PCM RIFF/WAVE file as `{:sample-rate :channels :samples}`, where
`:samples` is the interleaved short array. Chunks are walked rather than
assumed at offset 36: a recorder that writes `LIST` or `fact` before `data`
is still an ordinary WAV file.
sourceraw docstring

forget!clj

(forget! id)

Delete an imported voice. True when there was one to delete: the clip is the voice, so removing the file removes it from every catalogue at once.

Delete an imported voice. True when there was one to delete: the clip is the
voice, so removing the file removes it from every catalogue at once.
sourceraw docstring

import!clj

(import! {:keys [path voice-name language text]})

Take the recording at :path as a voice and return what it became.

:voice-name is what a human typed and only decides the id; :language and :text are optional. :text is the TRANSCRIPT of the clip, and it is worth supplying: pocket-tts is given the reference audio AND what it says, and a clone tracks the voice far better when it is not guessing at the words.

The recording is normalized once, here - one channel, 16-bit, its own sample rate kept - so that everything downstream reads one shape and the engine never meets a file format at synthesis time.

Take the recording at `:path` as a voice and return what it became.

`:voice-name` is what a human typed and only decides the id; `:language` and
`:text` are optional. `:text` is the TRANSCRIPT of the clip, and it is worth
supplying: pocket-tts is given the reference audio AND what it says, and a
clone tracks the voice far better when it is not guessing at the words.

The recording is normalized once, here - one channel, 16-bit, its own sample
rate kept - so that everything downstream reads one shape and the engine
never meets a file format at synthesis time.
sourceraw docstring

importedclj

(imported)

Every imported voice, by id. The catalogue is DERIVED from the directory, so a clip dropped in by hand is a voice and a deleted one stops being one.

Every imported voice, by id. The catalogue is DERIVED from the directory, so
a clip dropped in by hand is a voice and a deleted one stops being one.
sourceraw docstring

imported-voiceclj

(imported-voice id)

The imported voice with id, or nil. :clip is the absolute path of the recording, which is what the engine needs and what nobody else should read.

The imported voice with `id`, or nil. `:clip` is the absolute path of the
recording, which is what the engine needs and what nobody else should read.
sourceraw docstring

max-clip-bytesclj

A reference clip is seconds of speech. Anything past this is a mistake — an album, a video's audio track — and it is refused BEFORE it is read into memory, because this path is reachable from an upload.

A reference clip is seconds of speech. Anything past this is a mistake — an
album, a video's audio track — and it is refused BEFORE it is read into
memory, because this path is reachable from an upload.
sourceraw docstring

max-clip-secondsclj

What is kept when a longer recording is imported. The model imitates the clip; ten seconds is plenty and a minute only makes every sentence slower to speak, so the tail is dropped rather than the import refused.

What is kept when a longer recording is imported. The model imitates the
clip; ten seconds is plenty and a minute only makes every sentence slower to
speak, so the tail is dropped rather than the import refused.
sourceraw docstring

min-clip-secondsclj

Below this there is not enough voice in the recording to imitate.

Below this there is not enough voice in the recording to imitate.
sourceraw docstring

voice-idclj

(voice-id voice-name)

The id a voice is addressed by, from whatever a human typed as its name. Lower case, one dash between words, nothing else: the id travels through a URL path, a CLI argument and a JSON field, and nil when nothing survives.

The id a voice is addressed by, from whatever a human typed as its name.
Lower case, one dash between words, nothing else: the id travels through a
URL path, a CLI argument and a JSON field, and `nil` when nothing survives.
sourceraw docstring

voices-dirclj

(voices-dir)

Where imported clips live. A function, never a top-level def: native-image initializes this namespace at BUILD time, so a captured user.home would point every installed binary at the BUILDER's home.

Where imported clips live. A function, never a top-level `def`: `native-image`
initializes this namespace at BUILD time, so a captured `user.home` would
point every installed binary at the BUILDER's home.
sourceraw docstring

voices-dir-envclj

source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close