Liking cljdoc? Tell your friends :D

com.blockether.vis.internal.speech.assets

Where a speech asset comes from, what it is licensed under, and how it lands on disk.

resources/vis-models/manifest.edn is the only answer to "may we ship this": every model and data directory Vis installs has an entry there with an SPDX id, an attribution line and :is-commercial-ok true. An artifact that is not in the manifest cannot be downloaded, because nothing else carries a URL.

Each entry lists its sources in preference order and every source delivers the SAME bytes, so one :sha256 verifies them all:

:hf Hugging Face. SKIPPED unless a token is configured, tried FIRST when one is. A token is never required — it only changes WHERE the same bytes come from. :pack the Vis VOICE_ASSETS_PACK release, the default, so a first run needs no account anywhere. :upstream the project that published the artifact, last, as a fallback.

Sources are tried in that order and the first that installs cleanly wins, so an asset host being down is a slower install rather than a dead feature.

Where a speech asset comes from, what it is licensed under, and how it lands on
disk.

`resources/vis-models/manifest.edn` is the only answer to "may we ship
this": every model and data directory Vis installs has an entry there with an
SPDX id, an attribution line and `:is-commercial-ok true`. An artifact that is
not in the manifest cannot be downloaded, because nothing else carries a URL.

Each entry lists its sources in preference order and every source delivers the
SAME bytes, so one `:sha256` verifies them all:

  :hf        Hugging Face. SKIPPED unless a token is configured, tried FIRST
             when one is. A token is never required — it only changes WHERE
             the same bytes come from.
  :pack      the Vis VOICE_ASSETS_PACK release, the default, so a first run
             needs no account anywhere.
  :upstream  the project that published the artifact, last, as a fallback.

Sources are tried in that order and the first that installs cleanly wins, so
an asset host being down is a slower install rather than a dead feature.
raw docstring

ensure!clj

(ensure! asset)
(ensure! asset on-progress)

Install asset if it is not already there (blocking). Returns the install dir.

This is the AUTOMATIC path, so it refuses an :is-opt-in asset: one whose terms we will not accept on a user's behalf arrives only through an explicit install!, never because something wanted to speak.

Install `asset` if it is not already there (blocking). Returns the install
dir.

This is the AUTOMATIC path, so it refuses an `:is-opt-in` asset: one whose
terms we will not accept on a user's behalf arrives only through an explicit
`install!`, never because something wanted to speak.
sourceraw docstring

entryclj

(entry id)

The manifest entry with id. Throws rather than returning nil: an unknown id is a bug in the caller, not a missing download.

The manifest entry with `id`. Throws rather than returning nil: an unknown id
is a bug in the caller, not a missing download.
sourceraw docstring

env-valueclj

(env-value name)

A configured environment value, with blank treated as absent.

A configured environment value, with blank treated as absent.
sourceraw docstring

for-engineclj

(for-engine engine)

Every asset an engine owns, in manifest order.

Every asset an engine owns, in manifest order.
sourceraw docstring

hf-tokenclj

(hf-token)

The configured Hugging Face token, or nil. OPTIONAL by design: without one every entry still resolves, from the Vis asset pack. Returned only to the downloader that needs it — never logged, never put in an ex-info.

The configured Hugging Face token, or nil. OPTIONAL by design: without one
every entry still resolves, from the Vis asset pack. Returned only to the
downloader that needs it — never logged, never put in an ex-info.
sourceraw docstring

hf-token-env-varsclj

Both names the Hugging Face tooling itself reads, so a machine already set up for huggingface-cli needs no extra configuration.

Both names the Hugging Face tooling itself reads, so a machine already set up
for `huggingface-cli` needs no extra configuration.
sourceraw docstring

install!clj

(install! entry)
(install! entry on-progress)
(install! entry dir on-progress)

Download + verify + ATOMICALLY install entry, trying each source in turn. The final directory never holds partial files: an interrupted or corrupt download can't leave a truncated .onnx that native-aborts the JVM on the next load, it just stays absent. Returns the install dir.

on-progress (optional) is called with {:phase :downloading|:extracting :progress 0..99}. Transfer owns 0..89 and unpacking owns 90..98, so the number keeps MOVING through a multi-minute bzip2 extraction instead of parking on 99% and looking hung.

Download + verify + ATOMICALLY install `entry`, trying each source in turn.
The final directory never holds partial files: an interrupted or corrupt
download can't leave a truncated `.onnx` that native-aborts the JVM on the
next load, it just stays absent. Returns the install dir.

`on-progress` (optional) is called with {:phase :downloading|:extracting
:progress 0..99}. Transfer owns 0..89 and unpacking owns 90..98, so the number
keeps MOVING through a multi-minute bzip2 extraction instead of parking on 99%
and looking hung.
sourceraw docstring

install-dirclj

(install-dir entry)

Absolute directory this entry installs into.

Absolute directory this entry installs into.
sourceraw docstring

installed?clj

(installed? entry)
(installed? entry dir)
source

manifestclj

(manifest)

Every asset entry, in manifest order.

Every asset entry, in manifest order.
sourceraw docstring

manifest-resourceclj

source

missing-filesclj

(missing-files entry)
(missing-files entry dir)

The :requires paths of entry that are not present under dir.

The `:requires` paths of `entry` that are not present under `dir`.
sourceraw docstring

models-dir-envclj

source

models-rootclj

(models-root)

Where installed assets 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 installed assets 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

sourcesclj

(sources entry)
(sources entry is-token-available)

The sources of entry worth trying, in order. Sources that need a token are dropped when there is none and moved to the FRONT when there is one, which is the whole of the policy: a token changes where the bytes come from and never whether they can be had.

The sources of `entry` worth trying, in order. Sources that need a token are
dropped when there is none and moved to the FRONT when there is one, which is
the whole of the policy: a token changes where the bytes come from and never
whether they can be had.
sourceraw docstring

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