Skip to main content

Module hub

Module hub 

Source
Expand description

The Hugging Face Hub calls the speaking model’s install makes: the repository’s current revision, its blobs with their LFS digests, and the download of one pinned file.

The token is carried for a gated repository; the speaking model’s own repository is open, so an absent token changes nothing.

Re-exports§

use std::io::Write; 🔒
use std::path::Path; 🔒
use std::time::Duration; 🔒
use serde::Deserialize; 🔒
use serde::Deserialize; 🔒
use sha2::Digest; 🔒
use sha2::Sha256; 🔒

Structs§

Hub
A Hub client with the optional token every request carries.
HubBlob
One file the repository publishes.
Lfs 🔒
ModelInfo 🔒
SpeakingFiles
The files one speaking variant is made of.
TreeEntry 🔒

Constants§

CONNECT_TIMEOUT 🔒
The Hub’s connect and read bounds, a whole-request backstop sized so the largest variant (325 MB at 0.4 Mbps) still finishes, and the page cap on one listing before the install gives up.
MAX_TREE_PAGES 🔒
READ_TIMEOUT 🔒
TOTAL_TIMEOUT 🔒

Functions§

finish_file
Check a finished download and move it into place, or remove it.
next_page
The next page a Link header names, when it names one.
parse_blobs
The files a tree listing carries, directories dropped.
part_path 🔒
Where a download is written while it is being checked.
speaking_files
The model file and the style files one variant is made of.
tree_url
The listing URL for one revision: recursive, because the model and its voices sit under onnx/ and voices/.
verify_release
Refuse a listing whose model file disagrees with the compiled variant.
voice_id
The voice id a style file’s path names. Every named voice carries a <language><gender>_<name> stem; the repository’s voices/af.bin blend does not, and is not one of the model’s named voices.