Public exports¶
VoiceHub exposes one explicit package-root surface for discovery, loading,
inference, training, optimization, serving, and serialization. This page is
generated from voicehub.__all__ and complements the task-oriented
full API reference. Its grouping follows the role of Transformers'
Main Classes while
keeping speech-specific contracts and names.
Every row resolves from voicehub, points to repository source, records the
canonical defining or re-export module, and includes a callable signature or
an explicit constant/type-alias marker. Generation fails on duplicate,
unresolved, undocumented, source-less, or stale exports.
Current inventory: 261 public exports.
Package metadata¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
__version__ |
constant | voicehub |
constant |
Installed VoiceHub package version. | no |
Configuration, factories, and models¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
AudioProcessor |
class | voicehub.processing_utils |
(**kwargs) |
Validate the public audio-input envelope without loading audio. | no |
AutoConfig |
class | voicehub.auto |
() |
Instantiate the registered configuration class for a model type. | no |
AutoInferenceModel |
class | voicehub.automodel |
() |
Factory class that dynamically loads and instantiates TTS model backends. | no |
AutomaticSpeechRecognitionPipeline |
class | voicehub.pipelines |
(model) |
Pipeline that maps audio to :class:~voicehub.ASROutput. |
no |
AutoModel |
class | voicehub.auto |
() |
Task-aware entry point for every registered speech model. | no |
AutoModelForSpeechRecognition |
class | voicehub.auto |
() |
Load a registered automatic speech-recognition model. | no |
AutoModelForTextToSpeech |
class | voicehub.auto |
() |
Load a registered text-to-speech model. | no |
AutoModelForVoiceActivityDetection |
class | voicehub.auto |
() |
Load a registered voice-activity-detection model. | no |
AutoProcessor |
class | voicehub.auto |
() |
Create the processor paired with a VoiceHub speech configuration. | no |
BatchFeature |
class | voicehub.processing_utils |
inherited constructor |
Dictionary of processor values with a tensor-like to helper. |
no |
get_default_model_spec |
callable | voicehub.models.registry |
(task: 'SpeechTask | str') -> 'ModelSpec | None' |
Return the registry-declared default for a speech task, if present. | no |
get_model_spec |
callable | voicehub.models.registry |
(model_type: 'str') -> 'ModelSpec' |
Return registry metadata or raise an error containing valid choices. | no |
list_model_specs |
callable | voicehub.models.registry |
(*, task: 'SpeechTask | str | None' = None, native: 'bool | None' = None) -> 'tuple[ModelSpec, ...]' |
Return registered models with task and native-runtime filters. | no |
MODEL_CATALOG |
constant | voicehub.models.registry |
constant |
Read-only facade over the built-in model registry. | no |
ModelRegistry |
class | voicehub.models.registry |
(specs: 'Iterable[ModelSpec]' = (), *, aliases: 'Mapping[str, str] | None' = None) -> 'None' |
Thread-safe catalogue of lazily imported speech models. | no |
ModelSpec |
class | voicehub.models.registry |
(model_type: 'str', module: 'str', class_name: 'str', default_model_path: 'str', install_extra: 'str | None' = None, capabilities: 'tuple[str, ...]' = ('text-to-speech',), config_module: 'str' = 'voicehub.configuration_utils', config_class: 'str' = 'VoiceHubConfig', task: 'SpeechTask | str' = <SpeechTask.TEXT_TO_SPEECH: 'text-to-speech'>, architecture: 'str | None' = None, components: 'tuple[str, ...]' = (), default_for_task: 'bool' = False, processor_module: 'str | None' = None, processor_class: 'str | None' = None) -> None |
Metadata required to discover and lazily import a backend. | no |
Pipeline |
class | voicehub.pipelines |
(model) |
Small task adapter around a loaded or lazily constructed speech model. | no |
pipeline |
callable | voicehub.pipelines |
(task: 'SpeechTask | str', model=None, *, model_type: 'str | None' = None, config=None, device: 'str | None' = None, inference_strategy=None, config_kwargs: 'Mapping[str, Any] | None' = None, model_kwargs: 'Mapping[str, Any] | None' = None) -> 'Pipeline' |
Create a task pipeline from a checkpoint source or existing model. | no |
PreTrainedSpeechModel |
class | voicehub.modeling_utils |
() |
Marker base shared by task-specific pretrained speech wrappers. | no |
PreTrainedTTSModel |
class | voicehub.modeling_utils |
(config: 'VoiceHubConfig', *, device: 'str' = 'auto', lazy_load: 'bool' = True) |
Base lifecycle shared by source-integrated VoiceHub architectures. | no |
register_model_alias |
callable | voicehub.models.registry |
(alias: 'str', model_type: 'str', *, exist_ok: 'bool' = False) -> 'None' |
Register a public alias, allowing idempotence when requested. | no |
register_model_spec |
callable | voicehub.models.registry |
(spec: 'ModelSpec', *, aliases: 'Iterable[str]' = (), exist_ok: 'bool' = False) -> 'None' |
Register or explicitly replace one lazily imported model backend. | no |
SpeechTask |
enum | voicehub.tasks |
(value) |
Canonical public tasks supported by VoiceHub. | no |
TextToSpeechPipeline |
class | voicehub.pipelines |
(model) |
Pipeline that maps text to :class:~voicehub.TTSOutput. |
no |
unregister_model_alias |
callable | voicehub.models.registry |
(alias: 'str', *, missing_ok: 'bool' = False) -> 'str | None' |
Remove a public alias and return its former canonical target. | no |
unregister_model_spec |
callable | voicehub.models.registry |
(model_type: 'str', *, missing_ok: 'bool' = False) -> 'ModelSpec | None' |
Remove a model backend and every alias that resolves to it. | no |
VoiceActivityDetectionPipeline |
class | voicehub.pipelines |
(model) |
Pipeline that maps audio to :class:~voicehub.VADOutput. |
no |
VoiceHubConfig |
class | voicehub.configuration_utils |
(, sample_rate: 'int' = 24000, architectures: 'list[str] | None' = None, name_or_path: 'str | Path' = '', return_dict: 'bool' = True, output_hidden_states: 'bool' = False, output_attentions: 'bool' = False, generation_config: 'dict[str, Any] | None' = None, *kwargs) |
Serializable configuration shared by all VoiceHub speech architectures. | no |
VoiceHubProcessor |
class | voicehub.processing_utils |
(**kwargs) |
Transform raw synthesis inputs into model-ready values. | no |
Inputs and normalized outputs¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
ASRInferenceConfig |
class | voicehub.inference_configuration |
(, language: 'str | None' = None, task: 'str' = 'transcribe', return_timestamps: 'bool | str' = False, chunk_length_s: 'float | None' = None, stride_length_s: 'float | tuple[float, float] | None' = None, batch_size: 'int | None' = None, num_beams: 'int | None' = None, max_new_tokens: 'int | None' = None, hotwords: 'str | tuple[str, ...] | list[str] | None' = None, *kwargs) |
Decoding and long-audio controls shared by ASR providers. | no |
ASROutput |
class | voicehub.modeling_outputs |
(text: 'str', segments: 'tuple[ASRSegment, ...]' = (), language: 'str | None' = None, duration: 'float | None' = None, metadata: 'dict[str, Any]' = <factory>) -> None |
Normalized transcription produced by any ASR backend. | no |
ASRSegment |
class | voicehub.modeling_outputs |
(text: 'str', start: 'float | None' = None, end: 'float | None' = None, confidence: 'float | None' = None, language: 'str | None' = None, speaker: 'str | None' = None, words: 'tuple[ASRWord, ...]' = (), metadata: 'dict[str, Any]' = <factory>) -> None |
A timestamped transcription segment. | no |
ASRWord |
class | voicehub.modeling_outputs |
(text: 'str', start: 'float | None' = None, end: 'float | None' = None, confidence: 'float | None' = None, speaker: 'str | None' = None) -> None |
One recognized word with optional timing and confidence metadata. | no |
AudioInput |
class | voicehub.audio |
(waveform: 'Any', sampling_rate: 'int', path: 'Path | None' = None) -> None |
Materialized mono waveform with an explicit sampling rate. | no |
default_data_collator |
callable | voicehub.data_collator |
(features: 'list[Any]', return_tensors: 'str' = 'pt') -> 'dict[str, Any]' |
Collate mapping-like samples while preserving strings and metadata. | no |
DefaultDataCollator |
class | voicehub.data_collator |
(return_tensors: 'str' = 'pt') -> None |
Callable object form of :func:default_data_collator. |
no |
load_audio |
callable | voicehub.audio |
(audio: 'AudioInput | Mapping[str, Any] | str | Path | Any', *, sampling_rate: 'int | None' = None, target_sampling_rate: 'int | None' = None) -> 'AudioInput' |
Load, downmix, and optionally resample one waveform. | no |
PreTrainedASRModel |
class | voicehub.audio_modeling_utils |
(config: 'VoiceHubConfig', *, device: 'str' = 'auto', lazy_load: 'bool' = True) |
Base class for speech-recognition models. | no |
PreTrainedAudioModel |
class | voicehub.audio_modeling_utils |
(config: 'VoiceHubConfig', *, device: 'str' = 'auto', lazy_load: 'bool' = True) |
Shared lazy lifecycle for ASR and VAD wrappers. | no |
PreTrainedVADModel |
class | voicehub.audio_modeling_utils |
(config: 'VoiceHubConfig', *, device: 'str' = 'auto', lazy_load: 'bool' = True) |
Base class for voice-activity-detection models. | no |
SpeechInferenceConfig |
class | voicehub.inference_configuration |
(**kwargs) |
Base for task-specific, extensible inference configuration. | no |
SpeechSegment |
class | voicehub.modeling_outputs |
(start: 'float', end: 'float', score: 'float | None' = None, label: 'str' = 'speech', channel: 'int | str | None' = None, metadata: 'dict[str, Any]' = <factory>) -> None |
One detected interval of speech or non-speech. | no |
SpeechTrainingOutput |
class | voicehub.modeling_outputs |
(loss: 'Any | None' = None, logits: 'Any | None' = None, predictions: 'Any | None' = None, audio_values: 'Any | None' = None, hidden_states: 'Any | None' = None, attentions: 'Any | None' = None, training_phase: 'str | None' = None, optimizer_names: 'tuple[str, ...]' = (), losses: 'dict[str, Any]' = <factory>, metadata: 'dict[str, Any]' = <factory>) -> None |
Task-neutral differentiable output consumed by :class:voicehub.Trainer. |
no |
TTSGenerationConfig |
class | voicehub.generation_configuration |
(, output_file: 'str | Path | None' = None, seed: 'int | None' = None, speed: 'float | None' = None, temperature: 'float | None' = None, top_p: 'float | None' = None, max_new_tokens: 'int | None' = None, *kwargs) |
Serializable, extensible generation options for every TTS model. | no |
TTSOutput |
class | voicehub.modeling_outputs |
(audio: 'Any', sample_rate: 'int', file_path: 'str | Path | None' = None, metadata: 'dict[str, Any]' = <factory>) -> None |
Audio output with sampling metadata and optional backend details. | no |
TTSTrainingOutput |
class | voicehub.modeling_outputs |
(loss: 'Any | None' = None, logits: 'Any | None' = None, predictions: 'Any | None' = None, audio_values: 'Any | None' = None, hidden_states: 'Any | None' = None, attentions: 'Any | None' = None, training_phase: 'str | None' = None, optimizer_names: 'tuple[str, ...]' = (), losses: 'dict[str, Any]' = <factory>, metadata: 'dict[str, Any]' = <factory>) -> None |
Backward-compatible name for the shared speech training output. | no |
VADInferenceConfig |
class | voicehub.inference_configuration |
(, threshold: 'float' = 0.5, onset: 'float | None' = None, offset: 'float | None' = None, min_speech_duration_ms: 'int' = 250, min_silence_duration_ms: 'int' = 100, speech_pad_ms: 'int' = 30, max_speech_duration_s: 'float | None' = None, window_size_samples: 'int | None' = None, return_frames: 'bool' = False, *kwargs) |
Thresholding and segmentation controls shared by VAD providers. | no |
VADOutput |
class | voicehub.modeling_outputs |
(segments: 'tuple[SpeechSegment, ...]', duration: 'float | None' = None, sample_rate: 'int | None' = None, probabilities: 'Any | None' = None, metadata: 'dict[str, Any]' = <factory>) -> None |
Normalized speech regions produced by any VAD backend. | no |
VADSegment |
class | voicehub.modeling_outputs |
(start: 'float', end: 'float', score: 'float | None' = None, label: 'str' = 'speech', channel: 'int | str | None' = None, metadata: 'dict[str, Any]' = <factory>) -> None |
One detected interval of speech or non-speech. | no |
Inference and serving¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
bridge_vllm_omni_tts_config |
callable | voicehub.diffusion_serving.bridge |
(model_type: 'str', config: 'LLMBackendConfig') -> 'tuple[DiffusionTTSServingPlan, LLMBackendConfig]' |
Validate and reuse an existing vLLM-Omni speech configuration. | yes |
detect_vllm_omni_features |
callable | voicehub.diffusion_serving.vllm_omni |
(*, probe_registry: 'bool' = True) -> 'VLLMOmniFeatureStatus' |
Detect the optional engine and its public plugin registration API. | yes |
DiffusionServingBackend |
enum | voicehub.diffusion_serving.capabilities |
(value) |
Serving runtimes kept distinct by both engine and modality. | yes |
DiffusionServingCapability |
class | voicehub.diffusion_serving.capabilities |
(backend: 'DiffusionServingBackend', engine: 'str', diffusion_modalities: 'tuple[str, ...]', supports_tts: 'bool', supports_tts_diffusion: 'bool', verified_tts_models: 'tuple[str, ...]' = (), supports_custom_plugins: 'bool' = False, notes: 'str' = '') -> None |
Static, dependency-free facts about one serving runtime. | yes |
DiffusionServingCompatibilityError |
exception | voicehub.diffusion_serving.capabilities |
inherited constructor |
Raised when an engine cannot preserve a TTS diffusion pipeline. | yes |
DiffusionTTSServingPlan |
class | voicehub.diffusion_serving.capabilities |
(model_type: 'str', capability: 'DiffusionServingCapability', verified: 'bool', experimental: 'bool' = False, plugin: 'VLLMOmniDiffusionPlugin | None' = None) -> None |
Resolved TTS diffusion support without constructing an engine client. | yes |
EagerInferenceStrategy |
class | voicehub.inference_strategy |
() |
Default no-op strategy using each model's native eager runtime. | no |
get_diffusion_serving_capability |
callable | voicehub.diffusion_serving.capabilities |
(backend: 'str | DiffusionServingBackend') -> 'DiffusionServingCapability' |
Return one dependency-free backend capability record. | yes |
get_inference_strategy |
callable | voicehub.inference_strategy |
(strategy: 'str | InferenceStrategy | None' = None) -> 'InferenceStrategy' |
Resolve a strategy name or validate an existing strategy instance. | no |
get_llm_backend_support |
callable | voicehub.llm_serving.support |
(model_type: 'str', backend: 'str | LLMBackend', *, transport: 'str | LLMBackendTransport' = <LLMBackendTransport.AUTO: 'auto'>) -> 'tuple[LLMBackendSupport, LLMBackendTransport]' |
Resolve one pairing and its concrete transport, or fail clearly. | no |
InferenceStrategy |
class | voicehub.inference_strategy |
() |
Lifecycle hooks for an inference optimization runtime. | no |
list_diffusion_serving_capabilities |
callable | voicehub.diffusion_serving.capabilities |
(*, supports_tts: 'bool | None' = None, supports_visual_diffusion: 'bool | None' = None) -> 'tuple[DiffusionServingCapability, ...]' |
List serving facts without importing any optional engine. | yes |
list_inference_strategies |
callable | voicehub.inference_strategy |
() -> 'tuple[str, ...]' |
Return registered strategy names in deterministic order. | no |
list_llm_backend_support |
callable | voicehub.llm_serving.support |
(*, backend: 'str | LLMBackend | None' = None, model_type: 'str | None' = None) -> 'tuple[LLMBackendSupport, ...]' |
List verified pairings without importing either serving engine. | no |
LLMBackend |
enum | voicehub.llm_serving.configuration |
(value) |
Language-model serving engines understood by VoiceHub. | no |
LLMBackendConfig |
class | voicehub.llm_serving.configuration |
(backend: 'LLMBackend | str', endpoint: 'str | None' = None, transport: 'LLMBackendTransport | str' = <LLMBackendTransport.AUTO: 'auto'>, model: 'str | None' = None, api_key: 'str | None' = None, timeout: 'float' = 300.0, headers: 'Mapping[str, str] | None' = None, extra_body: 'Mapping[str, Any] | None' = None, max_response_bytes: 'int' = 536870912) -> None |
Connection settings for a separately managed vLLM/SGLang server. | no |
LLMBackendSupport |
class | voicehub.llm_serving.support |
(model_type: 'str', backend: 'LLMBackend', transports: 'tuple[LLMBackendTransport, ...]', default_transport: 'LLMBackendTransport', engine: 'str', checkpoint_family: 'str', notes: 'str' = '', task_type_without_reference: 'str | None' = None, task_type_with_reference: 'str | None' = None, task_type_aliases: 'tuple[tuple[str, str], ...]' = (), reference_format: 'str' = 'flat', speech_string_options: 'tuple[str, ...]' = ()) -> None |
One verified model/backend protocol pairing. | no |
LLMBackendTransport |
enum | voicehub.llm_serving.configuration |
(value) |
Protocol used between a VoiceHub wrapper and an engine server. | no |
register_inference_strategy |
callable | voicehub.inference_strategy |
(name: 'str', factory: 'InferenceStrategyFactory | type[InferenceStrategy]', *, exist_ok: 'bool' = False) -> 'None' |
Register a zero-argument strategy factory. | no |
register_llm_backend_support |
callable | voicehub.llm_serving.support |
(support: 'LLMBackendSupport', *, exist_ok: 'bool' = False) -> 'None' |
Register one process-local model/backend capability record. | no |
resolve_diffusion_tts_backend |
callable | voicehub.diffusion_serving.capabilities |
(model_type: 'str', backend: 'str | DiffusionServingBackend', *, plugin: 'VLLMOmniDiffusionPlugin | None' = None) -> 'DiffusionTTSServingPlan' |
Resolve complete TTS diffusion support, failing closed by default. | yes |
TokenGenerationRequest |
class | voicehub.llm_serving.protocol |
(prompt_token_ids: 'Sequence[int]', max_new_tokens: 'int', temperature: 'float' = 1.0, top_p: 'float | None' = None, top_k: 'int | None' = None, min_p: 'float | None' = None, repetition_penalty: 'float' = 1.0, stop_token_ids: 'Sequence[int]' = (), seed: 'int | None' = None) -> None |
Tokenizer-free request sent to a flat causal-LM server. | no |
TokenGenerationResult |
class | voicehub.llm_serving.protocol |
(token_ids: 'Sequence[int]', finish_reason: 'str | None' = None, prompt_tokens: 'int | None' = None, completion_tokens: 'int | None' = None) -> None |
Generated suffix IDs and optional engine accounting. | no |
TorchCompileInferenceStrategy |
class | voicehub.inference_strategy |
(*, backend: 'str' = 'inductor', mode: 'str | None' = None, fullgraph: 'bool' = False, dynamic: 'bool | None' = True, options: 'dict[str, Any] | None' = None, requirement: 'str' = 'required') -> 'None' |
Opt-in, reversible torch.compile inference preparation. |
no |
unregister_inference_strategy |
callable | voicehub.inference_strategy |
(name: 'str') -> 'None' |
Remove a custom strategy registration. | no |
unregister_llm_backend_support |
callable | voicehub.llm_serving.support |
(model_type: 'str', backend: 'str | LLMBackend', *, missing_ok: 'bool' = False) -> 'LLMBackendSupport | None' |
Remove one process-local capability record and return it. | no |
VLLMOmniDiffusionPlugin |
class | voicehub.diffusion_serving.vllm_omni |
(model_type: 'str', model_arch: 'str', module_name: 'str', class_name: 'str', complete_tts_pipeline: 'bool' = False, pre_process_func_name: 'str | None' = None, post_process_func_name: 'str | None' = None, action_post_process_func_name: 'str | None' = None, ir_op_priority_func_name: 'str | None' = None) -> None |
Experimental contract for a vLLM-Omni out-of-tree diffusion model. | yes |
VLLMOmniFeatureStatus |
class | voicehub.diffusion_serving.vllm_omni |
(installed: 'bool', version: 'str | None', register_diffusion_model: 'bool | None', error: 'str | None' = None) -> None |
Installed-version and registry API status for vLLM-Omni. | yes |
Training¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
AcousticTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Mel, codec, or waveform reconstruction objective. | no |
ALL_MODEL_TRAINING_SPECS |
constant | voicehub.training.specs |
constant |
Immutable catalog of every built-in model training specification. | no |
ASRDataArchitecture |
enum | voicehub.training.asr_data_contracts |
(value) |
Canonical source-data layouts used by ASR fine-tuning recipes. | no |
ASRDataReadiness |
enum | voicehub.training.asr_data_contracts |
(value) |
How far VoiceHub owns a model's ASR dataset preparation path. | no |
ASRDataset |
class | voicehub.training.asr_datasets |
(records: 'Iterable[Mapping[str, Any]]', *, model_type: 'str | None' = None, architecture: 'ASRDataArchitecture | str | None' = None, root: 'str | PathLike[str] | None' = None, aliases: 'Mapping[str, str] | None' = None, validate: 'bool' = True, validate_files: 'bool' = False, transform: 'Callable[[dict[str, Any]], Mapping[str, Any]] | None' = None, transform_fingerprint: 'str | None' = None) -> 'None' |
Validated ASR records from mappings, manifests, or WAV folders. | no |
ASRDatasetSpec |
class | voicehub.training.asr_data_contracts |
(architecture: 'ASRDataArchitecture', variants: 'tuple[ASRRecordVariant, ...]', model_type: 'str | None' = None, sample_rate: 'int | None' = None, description: 'str' = '', readiness: 'ASRDataReadiness | None' = None, training_support: 'str | None' = None, homogeneous_batch_fields: 'tuple[tuple[str, ...], ...]' = (), field_aliases: 'Mapping[str, str] | tuple[tuple[str, str], ...]' = (), record_normalizer: 'str | None' = None, record_normalizer_phase: 'str' = 'after-aliases') -> None |
Inspectable source-data contract for one ASR architecture or model. | no |
ASRRecordVariant |
class | voicehub.training.asr_data_contracts |
(name: 'str', required_fields: 'tuple[str, ...]' = (), one_of: 'tuple[tuple[str, ...], ...]' = (), at_most_one_of: 'tuple[tuple[str, ...], ...]' = (), forbidden_fields: 'tuple[str, ...]' = (), requires: 'tuple[tuple[str, tuple[str, ...]], ...]' = (), requires_one_of: 'tuple[tuple[str, tuple[str, ...]], ...]' = (), description: 'str' = '', preprocessed: 'bool' = False) -> None |
One accepted raw or preprocessed ASR record shape. | no |
AudioClassificationTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Audio classifier with explicit CE/BCE-with-logits fallbacks. | no |
AudioFieldSchema |
class | voicehub.training.collators |
(sequence_dim: 'int' = 0, padding_value: 'float | int | None' = None, padding_side: 'str' = 'right', length_field: 'str | None' = None, mask_field: 'str | None' = None, pad_to_multiple_of: 'int | None' = None, allow_missing: 'bool' = False) -> None |
Describe the variable-length dimension of one training field. | no |
AutoTrainingAdapter |
class | voicehub.training.auto |
() |
Resolve the adapter paired with a VoiceHub model or future family. | no |
BaseTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Expose an inference wrapper's source modules through a training API. | no |
build_diffusion_training_pair |
callable | voicehub.training.objectives.diffusion |
(samples: 'Any', *, coefficient_fn: 'Callable[[Any, Any], tuple[Any, Any]]', prediction_type: 'str' = 'epsilon', timesteps: 'Any | None' = None, noise: 'Any | None' = None, generator: 'Any | None' = None, timestep_sampler: 'Callable[..., Any] | None' = None, noise_sampler: 'Callable[..., Any] | None' = None, num_train_timesteps: 'int | None' = None) -> 'DiffusionTrainingPair' |
Construct a discrete diffusion input and epsilon/v/sample target. | no |
build_flow_matching_training_pair |
callable | voicehub.training.objectives.diffusion |
(samples: 'Any', *, prediction_type: 'str' = 'velocity', timesteps: 'Any | None' = None, noise: 'Any | None' = None, generator: 'Any | None' = None, timestep_sampler: 'Callable[..., Any] | None' = None, noise_sampler: 'Callable[..., Any] | None' = None) -> 'DiffusionTrainingPair' |
Construct a linear flow-matching path and its supervised target. | no |
CausalLMTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Autoregressive codec-token objective with shifted cross entropy. | no |
CompositeTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Multi-component adapter that prefers phase-specific native losses. | no |
CTCTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
CTC adapter that preserves backend blank and alignment semantics. | no |
DataCollatorForAudioTraining |
class | voicehub.training.collators |
(padding_value: 'float' = 0.0, label_pad_token_id: 'int' = -100, return_attention_mask: 'bool' = True, return_input_lengths: 'bool' = False, field_schemas: 'Mapping[str, AudioFieldSchema | Mapping[str, Any]] | None' = None) -> None |
Collate heterogeneous audio examples without guessing task semantics. | no |
DataCollatorForTTSTraining |
class | voicehub.training.collators |
(padding_value: 'float' = 0.0, label_pad_token_id: 'int' = -100, return_attention_mask: 'bool' = True, return_input_lengths: 'bool' = False, field_schemas: 'Mapping[str, AudioFieldSchema | Mapping[str, Any]] | None' = None) -> None |
Collate heterogeneous audio examples without guessing task semantics. | no |
diffusion_tts_acceleration_plan |
callable | voicehub.training.tts_acceleration |
(*, kernel_backend: 'str' = 'auto', attention_policy: 'str' = 'auto', use_torch_compile: 'bool' = True, compile_backend: 'str' = 'inductor', compile_mode: 'str | None' = 'max-autotune-no-cudagraphs', compile_fullgraph: 'bool' = False, compile_dynamic: 'bool | None' = True, compile_requirement: 'str' = 'auto') -> 'tuple[OptimizationPass, ...]' |
Build the diffusion-TTS bias-GELU, FA4, and compile plan. | no |
DiffusionTrainingPair |
class | voicehub.training.objectives.diffusion |
(noisy_inputs: 'Any', targets: 'Any', timesteps: 'Any', noise: 'Any', alpha: 'Any', sigma: 'Any') -> None |
Noisy model input and supervised target for a diffusion recipe. | no |
DiffusionTTSOptimizationConfig |
class | voicehub.training.tts_optimization |
(learning_rate: 'float' = 7.5e-05, weight_decay: 'float' = 0.01, adam_beta1: 'float' = 0.9, adam_beta2: 'float' = 0.999, adam_epsilon: 'float' = 1e-08, warmup_steps: 'int' = 20000, max_grad_norm: 'float' = 1.0, per_device_train_batch_size: 'int' = 64, frame_budget: 'int' = 38400, length_field: 'str' = 'num_frames', use_bf16: 'bool' = True, gradient_checkpointing: 'bool' = True, fused_adamw: 'bool' = True, ema_decay: 'float' = 0.9999, ema_update_after_step: 'int' = 0, ema_update_every: 'int' = 1, source_url: 'str' = 'https://github.com/SWivid/F5-TTS/tree/9c614e9657089213efc6a7421b30630be138a3f5', techniques: 'tuple[str, ...]' = ('mel-frame-budget batching', 'activation checkpointing', 'scaled dot-product attention', 'fused AdamW when CUDA supports it', 'linear warmup and decay', 'optimizer-update-coupled EMA', 'bfloat16 mixed precision')) -> None |
F5-style diffusion/flow-matching optimization profile. | no |
EarlyStoppingCallback |
class | voicehub.trainer_callback |
(early_stopping_patience: 'int' = 1, early_stopping_threshold: 'float' = 0.0) |
Stop after a metric fails to improve for a configured patience. | no |
EpochGroupedBatchSampler |
class | voicehub.training.asr_datasets |
(dataset: 'ASRDataset', *, batch_size: 'int', seed: 'int', shuffle: 'bool', drop_last: 'bool') -> 'None' |
Deterministic batches that never mix model-incompatible metadata. | no |
EpochLengthBatchSampler |
class | voicehub.training.tts_batching |
(records: 'Sequence[Mapping[str, Any]]', config: 'TTSBatchingConfig | Mapping[str, Any]', *, batch_size: 'int', seed: 'int', shuffle: 'bool', drop_last: 'bool') -> 'None' |
Epoch-addressable bucket or budget batches with exact-resume state. | no |
EvalPrediction |
class | voicehub.trainer_utils |
(predictions: 'Any', label_ids: 'Any', inputs: 'Any | None' = None) |
Container passed to a user-provided compute_metrics function. |
no |
FlowMatchingTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Continuous flow objective with strict native-loss preference. | no |
FrameClassificationTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Frame classifier using the classification fallback and explicit mask. | no |
get_asr_dataset_spec |
callable | voicehub.training.asr_data_contracts |
(model_type: 'str | None' = None, *, architecture: 'ASRDataArchitecture | str | None' = None) -> 'ASRDatasetSpec' |
Return the inspectable ASR dataset contract for a model or architecture. | no |
get_last_checkpoint |
callable | voicehub.trainer_utils |
(folder: 'str | Path') -> 'str | None' |
Return the checkpoint with the greatest numeric global step. | no |
get_training_spec |
callable | voicehub.training.specs |
(model_type: 'str') -> 'ModelTrainingSpec' |
Resolve inference aliases and return one registered training profile. | no |
get_training_strategy |
callable | voicehub.training.strategy |
(strategy: 'str | TrainingStrategy | None' = None) -> 'TrainingStrategy' |
Resolve a strategy name or validate an existing strategy instance. | no |
get_tts_dataset_spec |
callable | voicehub.training.data_contracts |
(model_type: 'str | None' = None, *, architecture: 'TTSDataArchitecture | str | None' = None) -> 'TTSDatasetSpec' |
Return the inspectable dataset contract for a model or architecture. | no |
get_tts_training_optimization_profile |
callable | voicehub.training.tts_optimization |
(model_type_or_architecture: 'str | TTSDataArchitecture') -> 'TTSTrainingOptimizationProfile' |
Resolve the applicable special profile for a model or architecture. | no |
IntervalStrategy |
enum | voicehub.trainer_utils |
(value) |
When a recurring Trainer action should run. | no |
list_asr_dataset_specs |
callable | voicehub.training.asr_data_contracts |
() -> 'tuple[ASRDatasetSpec, ...]' |
Return one model-specific dataset contract for every ASR profile. | no |
list_training_specs |
callable | voicehub.training.specs |
(*, task: 'SpeechTask | str | None' = <SpeechTask.TEXT_TO_SPEECH: 'text-to-speech'>, support: 'TrainingSupport | str | None' = None) -> 'tuple[ModelTrainingSpec, ...]' |
List profiles by task and, optionally, support boundary. | no |
list_training_strategies |
callable | voicehub.training.strategy |
() -> 'tuple[str, ...]' |
Return registered execution strategy names. | no |
list_tts_dataset_specs |
callable | voicehub.training.data_contracts |
() -> 'tuple[TTSDatasetSpec, ...]' |
Return one model-specific dataset contract for every TTS profile. | no |
llm_tts_acceleration_plan |
callable | voicehub.training.tts_acceleration |
(*, kernel_backend: 'str' = 'auto', attention_policy: 'str' = 'auto', use_torch_compile: 'bool' = True, compile_backend: 'str' = 'inductor', compile_mode: 'str | None' = 'max-autotune-no-cudagraphs', compile_fullgraph: 'bool' = False, compile_dynamic: 'bool | None' = True, compile_requirement: 'str' = 'auto') -> 'tuple[OptimizationPass, ...]' |
Build the LLM-TTS SwiGLU, FlashAttention-4, and compile plan. | no |
LLMTTSOptimizationConfig |
class | voicehub.training.tts_optimization |
(recipe: 'str' = 'conversationtts', learning_rate: 'float' = 1e-05, weight_decay: 'float' = 0.05, adam_beta1: 'float' = 0.9, adam_beta2: 'float' = 0.95, adam_epsilon: 'float' = 1e-08, warmup_ratio: 'float' = 0.03, max_grad_norm: 'float' = 1.0, gradient_accumulation_steps: 'int' = 1, per_device_train_batch_size: 'int' = 64, token_budget: 'int' = 7500, max_sequence_length: 'int' = 2048, length_field: 'str' = 'num_tokens', use_bf16: 'bool' = True, gradient_checkpointing: 'bool' = False, fused_adamw: 'bool' = True, lr_scheduler_type: 'str' = 'cosine', source_url: 'str' = 'https://github.com/Audio-Foundation-Models/ConversationTTS/tree/b3851f70c2dc0d35ba609734b08915637fe2a733', techniques: 'tuple[str, ...]' = ('offline frozen-codec tokenization', 'token-budget length batching', 'scaled dot-product attention', 'norm-excluded weight decay', 'fused AdamW when CUDA supports it', 'cosine decay with warmup', 'bfloat16 mixed precision')) -> None |
Codec-language-model optimization profile. | no |
masked_diffusion_regression_loss |
callable | voicehub.training.objectives.diffusion |
(predictions: 'Any', targets: 'Any', *, mask: 'Any | None' = None, weights: 'Any | None' = None, loss_type: 'str' = 'mse', reduction: 'str' = 'mean') |
Compute exact-shape masked diffusion or flow regression. | no |
ModelTrainingSpec |
class | voicehub.training.specs |
(model_type: 'str', family: 'TrainingFamily | str', module_paths: 'tuple[str, ...]' = ('model', 'model.model'), component_paths: 'tuple[str, ...]' = (), label_names: 'tuple[str, ...]' = ('labels', 'targets', 'target'), prediction_keys: 'tuple[str, ...]' = ('logits', 'predictions', 'audio_values', 'waveform'), loss_keys: 'tuple[str, ...]' = ('loss', 'total_loss'), loss_weights: 'tuple[tuple[str, float], ...]' = (), regression_loss: 'str' = 'mse', source_entrypoints: 'tuple[str, ...]' = (), native_training: 'bool' = False, separate_optimizers: 'bool' = False, support: 'TrainingSupport' = <TrainingSupport.PREPROCESSED: 'preprocessed'>, phases: 'tuple[TrainingPhaseSpec, ...]' = (), default_phase: 'str | None' = None, fallback_objective: 'str | None' = None, recipe_kind: 'TrainingRecipeKind' = <TrainingRecipeKind.SINGLE_PHASE: 'single-phase'>, allow_module_discovery: 'bool' = False, training_default_model_name_or_path: 'str | None' = None, field_schemas: 'Mapping[str, Any]' = <factory>, task: 'SpeechTask | str' = <SpeechTask.TEXT_TO_SPEECH: 'text-to-speech'>, adapter_factory: 'str | None' = None, dataset_factory: 'str | None' = None, dataset_spec_factory: 'str | None' = None, tokenizer_paths: 'tuple[str, ...]' = ('tokenizer', 'model.tokenizer'), optimization_profile_factory: 'str | None' = None) -> None |
Everything a training adapter needs to expose a source runtime. | no |
multi_codebook_cross_entropy |
callable | voicehub.training.objectives.token |
(logits: 'Any', labels: 'Any', *, loss_mask: 'Any | None' = None, ignore_index: 'int' = -100, causal_shift: 'bool' = False, sequence_dim: 'int' = -1, codebook_weights: 'Any | None' = None, codebook_dim: 'int' = 1, reduction: 'str' = 'mean') |
Compute exact-shape token cross entropy for one or more codebooks. | no |
OptimizerBundle |
class | voicehub.training.optimization |
(optimizers: 'Mapping[str, object]') |
Present multiple named optimizers through a routed optimizer API. | no |
PredictionOutput |
class | voicehub.trainer_utils |
(predictions: ForwardRef('Any'), label_ids: ForwardRef('Any'), metrics: ForwardRef('dict[str, float]')) |
Predictions, references, and metrics returned by Trainer.predict. |
no |
register_training_alias |
callable | voicehub.training.specs |
(alias: 'str', model_type: 'str', *, exist_ok: 'bool' = False) -> 'None' |
Register a training-only alias for a canonical profile. | no |
register_training_spec |
callable | voicehub.training.specs |
(spec: 'ModelTrainingSpec', *, exist_ok: 'bool' = False, aliases: 'Iterable[str]' = ()) -> 'None' |
Register or explicitly replace a training profile. | no |
register_training_strategy |
callable | voicehub.training.strategy |
(name: 'str', factory: 'Callable[[], TrainingStrategy] | type[TrainingStrategy]', *, exist_ok: 'bool' = False) -> 'None' |
Register a lazily constructed execution strategy. | no |
RNNTTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
RNN-T adapter that requires the backend's transducer objective. | no |
SchedulerBundle |
class | voicehub.training.optimization |
(schedulers: 'Mapping[str, object]') |
Keep one scheduler aligned with each named optimizer. | no |
SchedulerType |
enum | voicehub.trainer_utils |
(value) |
Learning-rate schedules implemented without external trainer packages. | no |
Seq2SeqTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Teacher-forced sequence objective without causal label shifting. | no |
set_seed |
callable | voicehub.trainer_utils |
(seed: 'int') -> 'None' |
Seed Python and the native PyTorch compute backend. | no |
SpeechDataset |
class | voicehub.training.dataset_base |
(records: 'Iterable[Mapping[str, Any]]', *, required_fields: 'Iterable[str]' = (), transform: 'Callable[[dict[str, Any]], Mapping[str, Any]] | None' = None) |
An immutable-indexed view over validated speech records. | no |
SpeechSeq2SeqTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Speech encoder-decoder adapter with an optional token CE fallback. | no |
TDTTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Token-and-duration transducer adapter requiring its native objective. | no |
TorchTrainingStrategy |
class | voicehub.training.strategy |
() |
Default lazy PyTorch execution strategy. | no |
Trainer |
class | voicehub.trainer |
(model=None, args: 'TrainingArguments | None' = None, data_collator: 'Callable[[list[Any]], dict[str, Any]] | None' = None, train_dataset=None, eval_dataset=None, processing_class=None, model_init: 'Callable[[], Any] | None' = None, compute_loss_func: 'Callable[[Any, Any, int | None], Any] | None' = None, compute_metrics: 'Callable[[EvalPrediction], dict[str, float]] | None' = None, callbacks: 'list[TrainerCallback | type[TrainerCallback]] | None' = None, optimizers: 'tuple[Any | None, Any | None]' = (None, None), optimizer_cls_and_kwargs: 'tuple[type, dict[str, Any]] | None' = None, preprocess_logits_for_metrics: 'Callable[[Any, Any], Any] | None' = None, training_adapter: 'BaseTrainingAdapter | None' = None, optimizer_factory: 'Callable[[str, list[tuple[str, Any]], TrainingArguments], Any] | None' = None, scheduler_factory: 'Callable[[str, Any, int, TrainingArguments], Any] | None' = None, training_strategy: 'str | TrainingStrategy | None' = None, optimization_plan: 'str | OptimizationPass | Iterable[str | OptimizationPass] | None' = None, optimization_config=None, optimization_context: 'OptimizationContext | None' = None, optimization_pass_registry: 'OptimizationPassRegistry | None' = None) |
Complete single-process PyTorch train/evaluate/checkpoint loop. | no |
TrainerCallback |
class | voicehub.trainer_callback |
() |
Base class for non-invasive Trainer customizations. | no |
TrainerControl |
class | voicehub.trainer_callback |
(should_training_stop: 'bool' = False, should_epoch_stop: 'bool' = False, should_save: 'bool' = False, should_evaluate: 'bool' = False, should_log: 'bool' = False) -> None |
Boolean signals returned by callbacks to control the loop. | no |
TrainerState |
class | voicehub.trainer_callback |
(epoch: 'float | None' = None, global_step: 'int' = 0, max_steps: 'int' = 0, logging_steps: 'int' = 500, eval_steps: 'int' = 500, save_steps: 'int' = 500, num_train_epochs: 'float' = 0.0, total_flos: 'float' = 0.0, log_history: 'list[dict[str, Any]]' = <factory>, best_metric: 'float | None' = None, best_model_checkpoint: 'str | None' = None, train_epoch: 'int | None' = None, train_batch_cursor: 'int | None' = None, is_local_process_zero: 'bool' = True, is_world_process_zero: 'bool' = True, is_hyper_param_search: 'bool' = False, trial_name: 'str | None' = None) -> None |
Mutable, serializable progress state shared with callbacks. | no |
TrainingArguments |
class | voicehub.training_args |
(output_dir: 'str' = 'trainer_output', overwrite_output_dir: 'bool' = False, do_train: 'bool' = False, do_eval: 'bool' = False, eval_strategy: 'IntervalStrategy | str' = <IntervalStrategy.NO: 'no'>, prediction_loss_only: 'bool' = False, per_device_train_batch_size: 'int' = 8, per_device_eval_batch_size: 'int' = 8, gradient_accumulation_steps: 'int' = 1, eval_accumulation_steps: 'int | None' = None, learning_rate: 'float' = 5e-05, weight_decay: 'float' = 0.0, adam_beta1: 'float' = 0.9, adam_beta2: 'float' = 0.999, adam_epsilon: 'float' = 1e-08, adamw_fused: 'bool' = False, adamw_torch_compile: 'bool' = False, max_grad_norm: 'float' = 1.0, num_train_epochs: 'float' = 3.0, max_steps: 'int' = -1, lr_scheduler_type: 'SchedulerType | str' = <SchedulerType.LINEAR: 'linear'>, warmup_ratio: 'float' = 0.0, warmup_steps: 'int' = 0, lr_scheduler_gamma: 'float' = 1.0, logging_strategy: 'IntervalStrategy | str' = <IntervalStrategy.STEPS: 'steps'>, logging_steps: 'int' = 500, logging_first_step: 'bool' = False, eval_steps: 'int | None' = None, save_strategy: 'IntervalStrategy | str' = <IntervalStrategy.STEPS: 'steps'>, save_steps: 'int' = 500, save_total_limit: 'int | None' = None, seed: 'int' = 42, data_seed: 'int | None' = None, dataloader_drop_last: 'bool' = False, dataloader_num_workers: 'int' = 0, dataloader_pin_memory: 'bool' = True, remove_unused_columns: 'bool' = True, label_names: 'list[str]' = <factory>, load_best_model_at_end: 'bool' = False, metric_for_best_model: 'str | None' = None, greater_is_better: 'bool | None' = None, gradient_checkpointing: 'bool' = False, fp16: 'bool' = False, bf16: 'bool' = False, use_cpu: 'bool' = False, disable_tqdm: 'bool' = True, report_to: 'list[str] | str' = <factory>, run_name: 'str | None' = None, wandb_project: 'str | None' = None, wandb_entity: 'str | None' = None, wandb_group: 'str | None' = None, wandb_tags: 'list[str]' = <factory>, wandb_notes: 'str | None' = None, wandb_mode: 'str | None' = None, wandb_log_model: 'str | bool' = False, evaluation_strategy: 'IntervalStrategy | str | None' = None) -> None |
Arguments controlling a single-process PyTorch training run. | no |
TrainingContext |
class | voicehub.training.contracts |
(phase: 'TrainingPhaseSpec', inputs: 'Mapping[str, Any]', step: 'int | None' = None, epoch: 'float | None' = None, is_training: 'bool' = True, metadata: 'Mapping[str, Any]' = <factory>) -> None |
Runtime context passed through phase preparation and execution hooks. | no |
TrainingFamily |
enum | voicehub.training.specs |
(value) |
Built-in objective and optimization shapes. | no |
TrainingPhaseKind |
enum | voicehub.training.contracts |
(value) |
Semantic role of a phase within a training recipe. | no |
TrainingPhaseSpec |
class | voicehub.training.contracts |
(name: 'str', component_paths: 'tuple[str, ...]' = (), optimizer_names: 'tuple[str, ...]' = (), forward_component: 'str | None' = None, forward_method: 'str' = 'forward', label_names: 'tuple[str, ...]' = ('labels', 'targets', 'target'), prediction_keys: 'tuple[str, ...]' = ('logits', 'predictions', 'audio_values', 'waveform'), loss_keys: 'tuple[str, ...]' = ('loss', 'total_loss'), loss_weights: 'tuple[tuple[str, float], ...]' = (), input_aliases: 'tuple[tuple[str, str], ...]' = (), required_inputs: 'tuple[str, ...]' = (), frequency: 'int' = 1, offset: 'int' = 0, fallback_objective: 'str | None' = None, kind: 'TrainingPhaseKind' = <TrainingPhaseKind.OBJECTIVE: 'objective'>, detach_inputs: 'tuple[str, ...]' = (), frozen_component_paths: 'tuple[str, ...]' = (), optimizer_step_after_phase: 'bool' = False) -> None |
One independently callable and optimizable phase of a TTS recipe. | no |
TrainingRecipeKind |
enum | voicehub.training.contracts |
(value) |
High-level orchestration shape of a model training profile. | no |
TrainingStrategy |
class | voicehub.training.strategy |
() |
Framework-facing operations used by :class:voicehub.Trainer. |
no |
TrainingSupport |
enum | voicehub.training.contracts |
(value) |
How completely a model's source integration supports fine-tuning. | no |
TrainOutput |
class | voicehub.trainer_utils |
(global_step: ForwardRef('int'), training_loss: ForwardRef('float'), metrics: ForwardRef('dict[str, float]')) |
Return value of :meth:voicehub.Trainer.train. |
no |
TTSBatchingConfig |
class | voicehub.training.tts_batching |
(strategy: 'TTSBatchingStrategy | str', length_field: 'str', length_multiplier: 'float' = 1.0, bucket_boundaries: 'tuple[int, ...]' = (), max_batch_units: 'int | None' = None, max_samples: 'int | None' = None, max_sequence_length: 'int | None' = None, budget_mode: 'str' = 'sum') -> None |
Serializable length batching settings attached to a TTSDataset. |
no |
TTSBatchingStrategy |
enum | voicehub.training.tts_batching |
(value) |
Supported variable-length batching policies. | no |
TTSDataArchitecture |
enum | voicehub.training.data_contracts |
(value) |
Canonical source-data layouts used by TTS training recipes. | no |
TTSDataReadiness |
enum | voicehub.training.data_contracts |
(value) |
How far VoiceHub owns a model's dataset preparation path. | no |
TTSDataset |
class | voicehub.training.tts_datasets |
(records: 'Iterable[Mapping[str, Any]]', *, model_type: 'str | None' = None, architecture: 'TTSDataArchitecture | str | None' = None, root: 'str | PathLike[str] | None' = None, aliases: 'Mapping[str, str] | None' = None, validate: 'bool' = True, validate_files: 'bool' = False, batching: 'TTSBatchingConfig | Mapping[str, Any] | None' = None, transform: 'Callable[[dict[str, Any]], Mapping[str, Any]] | None' = None, transform_fingerprint: 'str | None' = None) |
Portable TTS records loaded from mappings, JSON/JSONL, CSV, or TSV. | no |
TTSDatasetSpec |
class | voicehub.training.data_contracts |
(architecture: 'TTSDataArchitecture', variants: 'tuple[TTSRecordVariant, ...]', model_type: 'str | None' = None, sample_rate: 'int | None' = None, description: 'str' = '', readiness: 'TTSDataReadiness | None' = None, training_support: 'str | None' = None, field_aliases: 'Mapping[str, str] | tuple[tuple[str, str], ...]' = ()) -> None |
Inspectable source-data contract for one TTS architecture or model. | no |
TTSFieldSchema |
class | voicehub.training.collators |
(sequence_dim: 'int' = 0, padding_value: 'float | int | None' = None, padding_side: 'str' = 'right', length_field: 'str | None' = None, mask_field: 'str | None' = None, pad_to_multiple_of: 'int | None' = None, allow_missing: 'bool' = False) -> None |
Describe the variable-length dimension of one training field. | no |
TTSOptimizationProfile |
type alias | voicehub.training.tts_optimization |
type alias |
Union of the public TTS training optimization profiles. | no |
TTSRecordVariant |
class | voicehub.training.data_contracts |
(name: 'str', required_fields: 'tuple[str, ...]' = (), one_of: 'tuple[tuple[str, ...], ...]' = (), at_most_one_of: 'tuple[tuple[str, ...], ...]' = (), forbidden_fields: 'tuple[str, ...]' = (), requires: 'tuple[tuple[str, tuple[str, ...]], ...]' = (), requires_one_of: 'tuple[tuple[str, tuple[str, ...]], ...]' = (), description: 'str' = '', preprocessed: 'bool' = False) -> None |
One accepted source or preprocessed record shape. | no |
TTSTrainingOptimizationProfile |
type alias | voicehub.training.tts_optimization |
type alias |
Union of model-specific TTS training optimization profiles. | no |
unregister_training_alias |
callable | voicehub.training.specs |
(alias: 'str', *, missing_ok: 'bool' = False) -> 'str | None' |
Remove an alias and return its former canonical target. | no |
unregister_training_spec |
callable | voicehub.training.specs |
(model_type: 'str', *, missing_ok: 'bool' = False) -> 'ModelTrainingSpec | None' |
Remove and return a dynamically registered (or built-in) profile. | no |
unregister_training_strategy |
callable | voicehub.training.strategy |
(name: 'str') -> 'None' |
Remove a custom strategy registration. | no |
UpstreamNativeTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Require the integrated source runtime to return its native objective. | no |
vits_acceleration_plan |
callable | voicehub.training.tts_acceleration |
(*, kernel_backend: 'str' = 'auto', use_torch_compile: 'bool' = True, compile_backend: 'str' = 'inductor', compile_mode: 'str | None' = None, compile_fullgraph: 'bool' = False, compile_dynamic: 'bool | None' = None, compile_requirement: 'str' = 'auto', cuda_graphs: 'VITSCUDAGraphPolicy | str | bool' = <VITSCUDAGraphPolicy.DISABLED: 'disabled'>) -> 'tuple[OptimizationPass, ...]' |
Build VITS's gated-WaveNet-kernel and compile training plan. | no |
vits_discriminator_loss |
callable | voicehub.training.objectives.vits |
(real_scores: 'Any', fake_scores: 'Any', *, masks: 'Any | None' = None) -> 'VITSDiscriminatorLoss' |
Compute the standard VITS least-squares discriminator objective. | no |
vits_feature_matching_loss |
callable | voicehub.training.objectives.vits |
(real_features: 'Any', fake_features: 'Any', *, masks: 'Any | None' = None, scale: 'float' = 2.0, detach_real: 'bool' = True) |
Compute VITS feature matching across discriminator feature pyramids. | no |
vits_generator_adversarial_loss |
callable | voicehub.training.objectives.vits |
(fake_scores: 'Any', *, masks: 'Any | None' = None) |
Compute the standard VITS least-squares generator objective. | no |
vits_kl_loss |
callable | voicehub.training.objectives.vits |
(posterior_latents: 'Any', posterior_log_scale: 'Any', prior_mean: 'Any', prior_log_scale: 'Any', *, mask: 'Any | None' = None) |
Compute the diagonal-Gaussian KL component used by standard VITS. | no |
VITSCUDAGraphPolicy |
enum | voicehub.training.tts_acceleration |
(value) |
CUDA-graph policy for shape-bucketed VITS execution. | no |
VITSDiscriminatorLoss |
class | voicehub.training.objectives.vits |
(loss: 'Any', real_losses: 'tuple[Any, ...]', fake_losses: 'tuple[Any, ...]') -> None |
Total and per-discriminator least-squares GAN losses. | no |
VITSOptimizationConfig |
class | voicehub.training.tts_optimization |
(learning_rate: 'float' = 0.0002, weight_decay: 'float' = 0.01, adam_beta1: 'float' = 0.8, adam_beta2: 'float' = 0.99, adam_epsilon: 'float' = 1e-09, lr_decay_per_epoch: 'float' = 0.999875, max_grad_norm: 'float' = 1.0, per_device_train_batch_size: 'int' = 64, length_field: 'str' = 'num_frames', bucket_boundaries: 'tuple[int, ...]' = (32, 300, 400, 500, 600, 700, 800, 900, 1000), use_fp16: 'bool' = True, fused_adamw: 'bool' = True, compile_adamw: 'bool' = False, source_url: 'str' = 'https://github.com/jaywalnut310/vits/tree/2e561ba58618d021b5b8323d3765880f7e0ecfdb', techniques: 'tuple[str, ...]' = ('posterior-latent segment decoding', 'sequential discriminator and generator updates', 'spectrogram-length bucket batching', 'separate fused AdamW optimizers when CUDA supports them', 'optional torch.compile optimizer-step fusion', 'epoch-normalized exponential learning-rate decay', 'automatic mixed precision')) -> None |
Original-VITS optimizer, segment, and length-bucket profile. | no |
VITSTrainingAdapter |
class | voicehub.training.adapters |
(model, spec: 'ModelTrainingSpec') |
Phase-aware VITS/GAN adapter. | no |
WandbCallback |
class | voicehub.integrations |
() -> 'None' |
Log VoiceHub training runs to Weights & Biases. | no |
Optimization and codecs¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
AudioAutoencoderView |
class | voicehub.components.audio.codecs.base |
(codec: 'Any', encoder: 'Any | None', bottleneck: 'Any | None', decoder: 'Any | None', encoder_attribute: 'str | None' = None, bottleneck_attribute: 'str | None' = None, decoder_attribute: 'str | None' = None) -> None |
Non-owning encoder/bottleneck/decoder references for one codec. | yes |
AudioCodec |
class | voicehub.components.audio.codecs.base |
(args, *kwargs) |
Minimal structural protocol implemented by waveform codecs. | yes |
AudioCodecComponentView |
class | voicehub.components.audio.codecs.base |
(codec: 'Any', encoder: 'Any | None', bottleneck: 'Any | None', decoder: 'Any | None', encoder_attribute: 'str | None' = None, bottleneck_attribute: 'str | None' = None, decoder_attribute: 'str | None' = None) -> None |
Non-owning encoder/bottleneck/decoder references for one codec. | yes |
capture_codec_cuda_graph |
callable | voicehub.optimization.codecs |
(codec: 'Any', example_args: 'tuple[Any, ...] | Any', *, example_kwargs: 'Mapping[str, Any] | None' = None, target: 'str | Callable[..., Any]' = 'auto', decoder_only: 'bool | None' = None, epsilon: 'Tensor | None' = None, stochastic_vae: 'bool | None' = None, warmup_steps: 'int' = 3, clone_outputs: 'bool' = True) -> 'CodecCUDAGraphRunner' |
Capture one fixed-shape codec call with graph-aware VAE randomness. | yes |
CODEC_CATALOG |
constant | voicehub.components.audio.codecs.catalog |
constant |
Immutable catalog of the registered shared audio codecs. | yes |
codec_is_stochastic_vae |
callable | voicehub.components.audio.codecs.base |
(codec: 'Any', *, view: 'AudioCodecComponentView | None' = None) -> 'bool' |
Conservatively identify codecs whose encode/forward path samples a VAE. | yes |
codec_target_is_stochastic |
callable | voicehub.components.audio.codecs.base |
(codec: 'Any', target: 'str') -> 'bool' |
Resolve stochasticity for one callable codec boundary. | yes |
CodecCatalogEntry |
class | voicehub.components.audio.codecs.catalog |
(codec_id: 'str', family: 'str', variant: 'str', owners: 'tuple[CodecOwnerBinding, ...]', representation: 'CodecRepresentation', integration: 'CodecIntegration', stages: 'CodecStageManifest', stochastic_vae: 'bool', separable_autoencoder: 'bool', implementation_paths: 'tuple[str, ...]', primitives: 'CodecPrimitiveManifest', optimization: 'CodecOptimizationManifest', aliases: 'tuple[str, ...]' = (), gaps: 'tuple[str, ...]' = ()) -> None |
One canonical codec family/variant and all active TTS owners. | yes |
CodecCodeBatch |
type alias | voicehub.components.audio.codecs.base |
type alias |
Dense or ragged codec-token batch accepted by shared codec helpers. | yes |
CodecCompileComponent |
enum | voicehub.optimization.codecs |
(value) |
Structural codec boundary selected for compilation. | yes |
CodecCompilePolicy |
enum | voicehub.optimization.codecs |
(value) |
Whether compilation may fall back, must work, or is disabled. | yes |
CodecCUDAGraphCaptureError |
exception | voicehub.optimization.codecs |
inherited constructor |
A codec call cannot be captured with fixed-shape CUDA Graphs. | yes |
CodecCUDAGraphRunner |
class | voicehub.optimization.codecs |
(graph: 'Any', static_args: 'tuple[Any, ...]', static_kwargs: 'Mapping[str, Any]', static_output: 'Any', *, target_name: 'str', clone_outputs: 'bool', stochastic_target: 'bool') -> 'None' |
Fixed-shape CUDA-graph replay with owned static input buffers. | yes |
CodecIntegration |
enum | voicehub.components.audio.codecs.catalog |
(value) |
Where the codec graph sits relative to its owning TTS architecture. | yes |
CodecKernelBackend |
enum | voicehub.kernels.codecs |
(value) |
Implementation families understood by codec-only kernel policies. | yes |
CodecKernelPass |
class | voicehub.optimization.codec_accelerators |
(*, backend: 'CodecKernelBackend | str' = <CodecKernelBackend.AUTO: 'auto'>) -> 'None' |
Configure only modules exposing the codec-specific selector protocol. | yes |
CodecOptimizationCompatibilityError |
exception | voicehub.optimization.codecs |
inherited constructor |
A requested codec optimization has no safe structural target. | yes |
CodecOptimizationConfig |
class | voicehub.optimization.codecs |
(policy: 'CodecOptimizationPolicy | str' = <CodecOptimizationPolicy.EXACT: 'exact'>, kernel_backend: 'CodecKernelBackend | str' = <CodecKernelBackend.AUTO: 'auto'>, compile: 'CodecCompilePolicy | str | bool' = <CodecCompilePolicy.AUTO: 'auto'>, compile_components: 'tuple[CodecCompileComponent | str, ...] | CodecCompileComponent | str' = (<CodecCompileComponent.AUTO: 'auto'>,), compile_config: 'TorchCompileConfig | Mapping[str, Any] | None' = None) -> None |
Serializable codec optimization settings. | yes |
CodecOptimizationPlan |
class | voicehub.optimization.codecs |
(config: 'CodecOptimizationConfig', context: 'OptimizationContext', passes: 'tuple[OptimizationPass, ...]', compile_targets: 'tuple[OptimizationCompileTarget, ...]', decisions: 'tuple[CodecOptimizationDecision, ...]', target_type: 'str', _target_identity: 'int') -> None |
Resolved pass order and immutable structural decisions for one codec. | yes |
CodecOptimizationPolicy |
enum | voicehub.optimization.codecs |
(value) |
Numerical/semantic fidelity allowed by one optimization plan. | yes |
CodecOptimizationResult |
class | voicehub.optimization.codecs |
(plan: 'CodecOptimizationPlan', application: 'OptimizationResult') -> None |
Applied codec plan with reversible access to the eager model. | yes |
CodecRepresentation |
enum | voicehub.components.audio.codecs.catalog |
(value) |
The tensor representation crossing the TTS/codec boundary. | yes |
CodecStageAvailability |
enum | voicehub.components.audio.codecs.catalog |
(value) |
How one encoder, quantizer, or decoder stage is implemented. | yes |
coerce_codec_codes |
callable | voicehub.components.audio.codecs.base |
(value: 'CodecCodeBatch | Tensor | Iterable[Tensor]') -> 'CodecCodeBatch' |
Normalize common code containers without changing their tensors. | yes |
DenseCodecCodes |
class | voicehub.components.audio.codecs.base |
(values: 'Tensor', lengths: 'Tensor | None' = None) -> None |
A dense [batch, codebook, frame] discrete-code batch. |
yes |
diffusion_cache_request |
callable | voicehub.optimization.diffusion_cache |
(model: 'Any') -> 'Iterator[Any]' |
Isolate every cache target for one public generation request. | yes |
diffusion_cache_summary |
callable | voicehub.optimization.diffusion_cache |
(model: 'Any', *, details: 'bool' = False) -> 'dict[str, dict[str, Any]]' |
Return cache telemetry for every architecture-owned target in a model. | yes |
DiffusionArchitectureKind |
enum | voicehub.optimization.diffusion |
(value) |
The diffusion or flow formulation used by an active TTS graph. | yes |
DiffusionCacheConfig |
class | voicehub.optimization.diffusion_cache |
(method: 'DiffusionCacheMethod | str' = <DiffusionCacheMethod.DBCACHE: 'dbcache'>, front_blocks: 'int' = 1, back_blocks: 'int' = 0, residual_diff_threshold: 'float' = 0.08, warmup_steps: 'int' = 2, warmup_interval: 'int' = 1, max_cached_steps: 'int' = -1, max_consecutive_cached_steps: 'int' = 3, max_accumulated_relative_error: 'float | None' = None, predictor: 'DiffusionCachePredictor | str' = <DiffusionCachePredictor.REUSE: 'reuse'>, taylor_order: 'int' = 1, compute_step_mask: 'tuple[bool, ...]' = (), compute_step_policy: 'DiffusionCacheStepPolicy | str' = <DiffusionCacheStepPolicy.DYNAMIC: 'dynamic'>, num_inference_steps: 'int | None' = None, force_refresh_step_hint: 'int | None' = None, force_refresh_step_policy: 'DiffusionCacheRefreshPolicy | str' = <DiffusionCacheRefreshPolicy.ONCE: 'once'>, probe_downsample_factor: 'int' = 1, metrics_history_size: 'int' = 256, synchronize_distributed: 'bool' = True, epsilon: 'float' = 1e-06) -> None |
Serializable Cache-DiT-style settings for a VoiceHub DiT block list. | yes |
DiffusionCacheMethod |
enum | voicehub.optimization.diffusion_cache |
(value) |
Architecture-owned block-cache layouts. | yes |
DiffusionCachePass |
class | voicehub.optimization.diffusion_cache |
(config: 'DiffusionCacheConfig | Mapping[str, Any] | None' = None) -> 'None' |
Reversibly enable approximate block caching on declared DiT modules. | yes |
DiffusionCachePolicy |
enum | voicehub.optimization.diffusion_cache |
(value) |
Whether approximate diffusion caching is disabled, optional, or required. | yes |
DiffusionCachePredictor |
enum | voicehub.optimization.diffusion_cache |
(value) |
Approximation used for a skipped middle-block residual. | yes |
DiffusionCacheRefreshPolicy |
enum | voicehub.optimization.diffusion_cache |
(value) |
Whether a configured cache-refresh hint runs once or periodically. | yes |
DiffusionCacheStepPolicy |
enum | voicehub.optimization.diffusion_cache |
(value) |
How an explicit step-computation mask controls cache decisions. | yes |
DiffusionGuidanceStrategy |
enum | voicehub.optimization.diffusion_sampling |
(value) |
Classifier-free-guidance evaluation policy. | yes |
DiffusionModelOptimizationSupport |
class | voicehub.optimization.diffusion |
(model_type: 'str', architecture: 'str', kind: 'DiffusionArchitectureKind', operations: 'tuple[DiffusionOperation, ...]', training: 'bool', distributed_training: 'bool', optimization_passes: 'tuple[str, ...]', sampling_techniques: 'tuple[str, ...]') -> None |
One public TTS model's declared diffusion optimization surface. | yes |
DiffusionOperation |
enum | voicehub.optimization.diffusion |
(value) |
Optimization-relevant operations present in an active sampler. | yes |
DiffusionPredictionCacheMethod |
enum | voicehub.optimization.diffusion_sampling |
(value) |
Whole-model prediction cache selected at the sampler boundary. | yes |
DiffusionSamplingConfig |
class | voicehub.optimization.diffusion_sampling |
(target_steps: 'int | None' = None, schedule: 'DiffusionScheduleStrategy | str' = <DiffusionScheduleStrategy.NATIVE: 'native'>, solver: 'DiffusionSolverStrategy | str' = <DiffusionSolverStrategy.NATIVE: 'native'>, stork_stages: 'int' = 9, guidance: 'DiffusionGuidanceStrategy | str' = <DiffusionGuidanceStrategy.NATIVE: 'native'>, guidance_start: 'float' = 0.0, guidance_end: 'float' = 1.0, adaptive_guidance_threshold: 'float' = 0.01, adaptive_guidance_warmup_steps: 'int' = 4, adaptive_guidance_patience: 'int' = 2, prediction_cache: 'DiffusionPredictionCacheMethod | str | bool' = <DiffusionPredictionCacheMethod.DISABLED: 'disabled'>, cache_interval: 'int' = 2, cache_warmup_steps: 'int' = 2, cache_max_consecutive_steps: 'int' = 2, cache_rel_l1_threshold: 'float' = 0.08, cache_error_budget: 'float' = 0.2, teacache_coefficients: 'tuple[float, ...]' = (), smoothcache_compute_step_mask: 'tuple[bool, ...]' = (), taylor_order: 'int' = 1, epsilon: 'float' = 1e-06) -> None |
Serializable sampler-level acceleration configuration. | yes |
DiffusionSamplingController |
class | voicehub.optimization.diffusion_sampling |
(config: 'DiffusionSamplingConfig') |
Request-scoped schedule, guidance, and prediction-cache controller. | yes |
DiffusionSamplingPass |
class | voicehub.optimization.diffusion_sampling |
(config: 'DiffusionSamplingConfig | Mapping[str, Any] | None' = None) -> 'None' |
Reversibly enable sampler-level diffusion acceleration. | yes |
DiffusionSamplingPolicy |
enum | voicehub.optimization.diffusion_sampling |
(value) |
Whether sampler-level acceleration is disabled, optional, or required. | yes |
DiffusionScheduleStrategy |
enum | voicehub.optimization.diffusion_sampling |
(value) |
How a native schedule is rebuilt when target_steps is smaller. |
yes |
DiffusionSolverStrategy |
enum | voicehub.optimization.diffusion_sampling |
(value) |
Sampler integration rule for a supplied velocity prediction. | yes |
DiffusionStepContext |
class | voicehub.optimization.diffusion_sampling |
(index: 'int', total_steps: 'int', timestep: 'Tensor | float', next_timestep: 'Tensor | float', lane: 'str' = 'default', solver: 'str' = 'euler', stage: 'str' = 'main', outer_step: 'int | None' = None) -> None |
Identity and solver state for one model evaluation. | yes |
discover_codec_compile_targets |
callable | voicehub.optimization.codecs |
(codec: 'Any', *, mode: 'OptimizationMode | str' = <OptimizationMode.INFERENCE: 'inference'>, components: 'CodecCompileComponent | str | Iterable[CodecCompileComponent | str]' = <CodecCompileComponent.AUTO: 'auto'>) -> 'tuple[OptimizationCompileTarget, ...]' |
Discover callable codec boundaries without requiring model changes. | yes |
get_codec_entries_for_model |
callable | voicehub.components.audio.codecs.catalog |
(model_type: 'str') -> 'tuple[CodecCatalogEntry, ...]' |
Return the single codec-family entry owned by an active LLM-TTS model. | yes |
get_codec_entry |
callable | voicehub.components.audio.codecs.catalog |
(codec_id: 'str') -> 'CodecCatalogEntry' |
Return one codec entry by canonical ID, family, alias, or owner model type. | yes |
get_diffusion_model_optimization_support |
callable | voicehub.optimization.diffusion |
(model_type: 'str') -> 'DiffusionModelOptimizationSupport' |
Return one registered diffusion/flow TTS model or fail explicitly. | yes |
get_tts_optimization_config |
callable | voicehub.optimization.tts |
(target: 'str | Any', **overrides: 'Any') -> 'TTSOptimizationConfig' |
Return a validated universal config for one registered TTS target. | no |
get_tts_optimization_support |
callable | voicehub.optimization.tts |
(target: 'str | Any') -> 'TTSOptimizationSupport' |
Return the statically declared optimization surface for one target. | no |
get_vits_model_optimization_support |
callable | voicehub.optimization.vits |
(model_type: 'str') -> 'VITSModelOptimizationSupport' |
Return one registered VITS model's support or fail explicitly. | no |
list_codec_entries |
callable | voicehub.components.audio.codecs.catalog |
(*, model_type: 'str | None' = None, representation: 'CodecRepresentation | str | None' = None, integration: 'CodecIntegration | str | None' = None, has_gap: 'bool | None' = None) -> 'tuple[CodecCatalogEntry, ...]' |
List entries in stable order with optional graph-free filters. | yes |
list_diffusion_model_optimization_support |
callable | voicehub.optimization.diffusion |
() -> 'tuple[DiffusionModelOptimizationSupport, ...]' |
List active public diffusion/flow TTS models by architecture traits. | yes |
list_tts_optimization_support |
callable | voicehub.optimization.tts |
() -> 'tuple[TTSOptimizationSupport, ...]' |
List optimization capabilities for every registered TTS model. | no |
list_vits_model_optimization_support |
callable | voicehub.optimization.vits |
() -> 'tuple[VITSModelOptimizationSupport, ...]' |
List registered models marked by architecture traits, not name checks. | no |
OptimizationCompileTarget |
class | voicehub.optimization.protocols |
(label: 'str', owner: 'Any', attribute: 'str', component: 'str | None' = None) -> None |
One method boundary that synthesis or training actually invokes. | no |
OptimizationCompileTargetProvider |
class | voicehub.optimization.protocols |
(args, *kwargs) |
Contract for runtimes whose executed boundary is not plain forward. | no |
OptimizationModuleRoot |
class | voicehub.optimization.protocols |
(label: 'str', module: 'Any') -> None |
One runtime-owned module tree inspected by selector passes. | no |
OptimizationModuleRootProvider |
class | voicehub.optimization.protocols |
(args, *kwargs) |
Contract for runtimes that expose more than one module tree. | no |
OptimizationRuntimeProtocol |
class | voicehub.optimization.protocols |
(args, *kwargs) |
Complete checkpoint-aware contract for composite speech runtimes. | no |
optimize_codec |
callable | voicehub.optimization.codecs |
(codec: 'Any', config: 'CodecOptimizationConfig | Mapping[str, Any] | None' = None, *, mode: 'OptimizationMode | str' = <OptimizationMode.INFERENCE: 'inference'>, context: 'OptimizationContext | None' = None) -> 'CodecOptimizationResult' |
Resolve and apply one reversible codec optimization plan. | yes |
RaggedCodecCodes |
class | voicehub.components.audio.codecs.base |
(levels: 'tuple[Tensor, ...]', lengths: 'tuple[Tensor | None, ...] | None' = None, strides: 'tuple[int, ...] | None' = None) -> None |
A hierarchical or multirate discrete-code batch. | yes |
reset_diffusion_cache_metrics |
callable | voicehub.optimization.diffusion_cache |
(model: 'Any') -> 'int' |
Reset telemetry on every cache target and return the target count. | yes |
resolve_codec_optimization |
callable | voicehub.optimization.codecs |
(codec: 'Any', config: 'CodecOptimizationConfig | Mapping[str, Any] | None' = None, *, mode: 'OptimizationMode | str' = <OptimizationMode.INFERENCE: 'inference'>, context: 'OptimizationContext | None' = None) -> 'CodecOptimizationPlan' |
Resolve a side-effect-free, structural codec optimization plan. | yes |
resolve_tts_optimization |
callable | voicehub.optimization.tts |
(target: 'str | Any', config: 'TTSOptimizationConfig | Mapping[str, Any] | None' = None, *, mode: 'OptimizationMode | str' = <OptimizationMode.INFERENCE: 'inference'>, context: 'OptimizationContext | None' = None, registry: 'OptimizationPassRegistry | None' = None) -> 'TTSOptimizationPlan' |
Resolve one safe, ordered policy for any registered TTS model. | no |
separate_audio_codec |
callable | voicehub.components.audio.codecs.base |
(codec: 'Any', *, encoder: 'str | Any | None' = None, bottleneck: 'str | Any | None' = None, decoder: 'str | Any | None' = None) -> 'AudioCodecComponentView' |
Create a non-owning component view of an existing codec graph. | yes |
STORK2FlowSolver |
class | voicehub.optimization.diffusion_solvers |
(config: 'STORKFlowConfig | None' = None) |
Stateful STORK-2/Taylor-1 integrator for one request and solver lane. | yes |
STORKFlowConfig |
class | voicehub.optimization.diffusion_solvers |
(stages: 'int' = 9, accumulator_dtype: 'str' = 'float32') -> None |
STORK-2 settings for a direct deterministic velocity field. | yes |
TTSAttentionImplementation |
enum | voicehub.optimization.tts |
(value) |
Attention policies understood by the built-in TTS resolver. | no |
TTSCompilePolicy |
enum | voicehub.optimization.tts |
(value) |
Whether compilation may fall back, must work, or is disabled. | no |
TTSKernelBackend |
enum | voicehub.optimization.tts |
(value) |
Custom-kernel policy for architecture-owned fused operations. | no |
TTSOptimizationCompatibilityError |
exception | voicehub.optimization.tts |
inherited constructor |
A requested implementation is not valid for a model or context. | no |
TTSOptimizationConfig |
class | voicehub.optimization.tts |
(attn_implementation: 'TTSAttentionImplementation | str' = <TTSAttentionImplementation.AUTO: 'auto'>, kernel_backend: 'TTSKernelBackend | str' = <TTSKernelBackend.AUTO: 'auto'>, compile: 'TTSCompilePolicy | str | bool' = <TTSCompilePolicy.AUTO: 'auto'>, compile_config: 'TorchCompileConfig | Mapping[str, Any] | None' = None, diffusion_cache: 'DiffusionCachePolicy | str | bool' = 'disabled', diffusion_cache_config: 'DiffusionCacheConfig | Mapping[str, Any] | None' = None, diffusion_sampling: 'DiffusionSamplingPolicy | str | bool' = 'disabled', diffusion_sampling_config: 'DiffusionSamplingConfig | Mapping[str, Any] | None' = None, optimization_passes: 'tuple[str, ...]' = ()) -> None |
Serializable, Transformers-style optimization settings for TTS. | no |
TTSOptimizationDecision |
class | voicehub.optimization.tts |
(feature: 'str', requested: 'str', selected: 'str', implementation_pass: 'str | None', reason: 'str') -> None |
One requested policy choice and its statically resolved outcome. | no |
TTSOptimizationPlan |
class | voicehub.optimization.tts |
(config: 'TTSOptimizationConfig', context: 'OptimizationContext', support: 'TTSOptimizationSupport', passes: 'tuple[OptimizationPass, ...]', decisions: 'tuple[TTSOptimizationDecision, ...]') -> None |
Resolved, ordered pass plan plus all fallback decisions. | no |
TTSOptimizationResult |
class | voicehub.optimization.tts |
(plan: 'TTSOptimizationPlan', model: 'Any', application: 'OptimizationResult | None' = None) -> None |
Universal result for both transformed and native-fallback plans. | no |
TTSOptimizationSupport |
class | voicehub.optimization.tts |
(model_type: 'str | None', architecture: 'str | None', attention_implementations: 'tuple[str, ...]', kernel_backends: 'tuple[str, ...]', compile: 'bool', diffusion_cache: 'bool', diffusion_sampling: 'bool', diffusion_sampling_techniques: 'tuple[str, ...]', optimization_kinds: 'tuple[str, ...]') -> None |
Architecture-level implementations available to one TTS model. | no |
VITSArchitectureKind |
enum | voicehub.optimization.vits |
(value) |
How a registered public model incorporates the VITS architecture. | no |
VITSModelOptimizationSupport |
class | voicehub.optimization.vits |
(model_type: 'str', architecture: 'str', kind: 'VITSArchitectureKind', training: 'bool', distributed_training: 'bool', optimization_passes: 'tuple[str, ...]', kernel_operations: 'tuple[str, ...]') -> None |
One public model's family role and shared optimization contract. | no |
Policies, errors, and utilities¶
| Export | Kind | Canonical module | Signature | Summary | Lazy |
|---|---|---|---|---|---|
LLMBackendCompatibilityError |
exception | voicehub.errors |
inherited constructor |
Raised when an engine cannot preserve an architecture's semantics. | no |
LLMBackendError |
exception | voicehub.errors |
inherited constructor |
Base exception for external language-model serving failures. | no |
LLMBackendRequestError |
exception | voicehub.errors |
inherited constructor |
Raised when an external serving request fails or is malformed. | no |
ModelLicenseSpec |
class | voicehub.policies.licensing |
(model_type: 'str', license_id: 'str', commercial_use: 'bool | None', upstream: 'str', notice: 'str') -> None |
License conditions attached to source or checkpoint artifacts. | no |
OptionalDependencyError |
exception | voicehub.errors |
inherited constructor |
Raised when the selected backend has not been installed. | no |
SourceLicenseError |
exception | voicehub.errors |
inherited constructor |
Raised when upstream source cannot legally be redistributed. | no |
UnknownModelError |
exception | voicehub.errors |
inherited constructor |
Raised when a model key is not registered. | no |
VoiceHubError |
exception | voicehub.errors |
inherited constructor |
Base exception for VoiceHub-specific failures. | no |