VoiceHubasr_wenet
WeNetASR¶
Loads a reviewed VoiceHub conversion of WeNet GigaSpeech U2++ and requests word timestamps.
Parameter metadata: Not reported: the audited metadata available for the registered default does not provide an exact parameter total.
Usage¶
Complete the VoiceHub installation once, then run this repository-authored example. Model pages intentionally contain no package-install command.
This example is maintained against VoiceHub's public API; it is not copied from an upstream demo or package README.
Model-specific path: Loads a reviewed VoiceHub conversion of WeNet GigaSpeech U2++ and requests word timestamps.
Inputs and controls: The external release is not a drop-in HF model; convert it through the audited artifact boundary first.
Checkpoint note: The registry identifier is not a Hugging Face repository and the original upstream archive endpoints are unavailable. VoiceHub verifies an immutable mirror against the published 503,845,602-byte archive's SHA-256. Convert that trust-gated pickle archive first, then replace the path below with the resulting VoiceHub-native directory containing model.safetensors, config.json, tokenizer.model, and units.txt.
from pathlib import Path
from voicehub import AutoModelForSpeechRecognition
AUDIO_FILE = Path("speech.wav")
if not AUDIO_FILE.is_file():
raise FileNotFoundError(AUDIO_FILE)
model = AutoModelForSpeechRecognition.from_pretrained(
'path/to/converted-wenet-u2pp',
model_type='asr_wenet',
device="cuda",
lazy_load=True,
)
output = model.transcribe(
AUDIO_FILE,
language="en",
return_timestamps="word",
num_beams=10,
)
print(output.text)
for segment in output.segments:
print(segment.start, segment.end, segment.text, segment.confidence)
Use authorized recordings. Verify hardware needs and pin a revision in production.
Overview¶
asr_wenet is a VoiceHub automatic speech recognition
integration. This page is generated from its registry contract.
| Property | Value |
|---|---|
| Task | Automatic speech recognition |
| Architecture | wenet-asr |
| Runtime | VoiceHub-native |
| Languages | en |
| Capabilities | automatic-speech-recognition, english, timestamps, safetensors, fine-tuning, voicehub-native, ctc, attention-rescoring |
| Reusable components | — |
| Normalized output | ASROutput |
Language support¶
Supported language abbreviations
en
Paper and GitHub¶
- Paper: WeNet: Production Oriented Streaming and Non-Streaming End-to-End Speech Recognition Toolkit
- Upstream GitHub: WeNet
- VoiceHub source: VoiceHub model implementation
Configuration¶
Load configuration without constructing the model:
| Property | Value |
|---|---|
| Canonical model type | asr_wenet |
| Configuration class | WeNetASRConfig |
| Architecture class | WeNetASRForSpeechRecognition |
Processing¶
Create the registered processor without allocating model weights:
from voicehub import AutoProcessor
processor = AutoProcessor.from_pretrained(
'path/to/converted-wenet-u2pp',
model_type='asr_wenet',
)
print(type(processor).__name__)
Inference¶
The Usage example returns ASROutput through AutoModelForSpeechRecognition.
Input and output contract¶
| Property | Value |
|---|---|
| Readiness | integrated-raw |
| Data architecture | hybrid-ctc-attention |
| Sample rate | 16,000 Hz |
| Contract getter | get_asr_dataset_spec('asr_wenet') |
| Variant | Required fields | One of | Boundary | Other rules |
|---|---|---|---|---|
raw-audio |
audio |
text / transcription / transcript | Source | at most one: text / transcription / transcript |
wenet-waveform-model-ready |
input_signal, input_signal_length, labels, label_lengths |
— | Prepared | — |
wenet-feature-model-ready |
features, feature_lengths, labels, label_lengths |
— | Prepared | — |
WeNet U2++ joint CTC/attention fine-tuning records. See the data workflow.
Training and optimization¶
Use available_optimization_passes() to discover reversible public passes.
Unsupported runtime or hardware fails closed before mutation.
Training contract¶
| Property | Value |
|---|---|
| Support | native |
| Family | speech-sequence-to-sequence |
| Recipe | single-phase |
| Default phase | speech_recognition |
| Training checkpoint | wenet/gigaspeech-u2pp-conformer |
| Native training graph | yes |
| Phase | Kind | Components | Required inputs | Loss keys |
|---|---|---|---|---|
speech_recognition |
objective | model |
labels, label_lengths |
loss, attention_loss, ctc_loss |
The integration accepts its declared source or prepared contract directly. Call model.validate_training_support() first, then follow the
training workflow.
Checkpoints, provenance, license, and limitations¶
| Property | Value |
|---|---|
| Default checkpoint | wenet/gigaspeech-u2pp-conformer |
| Hugging Face ID | Not published / not applicable No canonical Hugging Face repository for the exact audited GigaSpeech U2++ release; the page links the verified external archive and conversion boundary. |
| Checkpoint status | Original upstream archive unavailable (HTTP 404 and TLS failures verified 2026-08-04); exact bytes are available from the immutable openspeech/wenet-models mirror at 90acd57d17169a15d5ceab462c6e7db3bd003921 |
| Optional dependency extra | Core package |
| Hardware and runtime | Usage selects cuda; verify checkpoint-specific requirements |
| Real-checkpoint evidence | Release evidence; a registry default alone is not execution evidence |
| Implementation | voicehub.models.asr_wenet.WeNetASRForSpeechRecognition |
| Configuration | voicehub.models.asr_wenet.WeNetASRConfig |
| Source provenance | voicehub/architectures/wenet_u2pp/SOURCE.json |
| License | NOT DECLARED |
The published GigaSpeech checkpoint archive does not declare a checkpoint license. The VoiceHub-owned architecture port is Apache-2.0, but that source license is not assumed for the weights. Commercial use: review required.
Confirm the checkpoint revision, access terms, provenance, and license.
Limitations¶
- The registry identifier is not a Hugging Face repository and the original upstream archive endpoints are unavailable. VoiceHub verifies an immutable mirror against the published 503,845,602-byte archive's SHA-256. Convert that trust-gated pickle archive first, then replace the path below with the resulting VoiceHub-native directory containing model.safetensors, config.json, tokenizer.model, and units.txt.
- Validate memory, precision, and optional dependencies on the target system.
- Public optimizations fail closed when the runtime or hardware cannot satisfy their validation contract; an unavailable pass is not reported as applied.
- Contract tests do not replace the linked released-checkpoint evidence.
Public API¶
Use the stable configuration, processor, and task-model facades below.
Configuration
WeNetASRConfig¶
Parameters¶
**config_kwargs— Configuration fields validated by WeNetASRConfig.
Model
WeNetASRForSpeechRecognition¶
Parameters¶
pretrained_model_name_or_path— Hub ID or compatible local directory.model_type— Canonical model type; use 'asr_wenet'.config— Optional preloaded WeNetASRConfig instance.**model_kwargs— Model-specific loading arguments.
from voicehub import get_model_spec
spec = get_model_spec('asr_wenet')
print(spec.display_name, spec.task.value)
| Purpose | Public object |
|---|---|
| Discover | get_model_spec('asr_wenet') |
| Load and run | AutoModelForSpeechRecognition |
| Configure | WeNetASRConfig |
| Process | AutoProcessor |
| Model implementation | WeNetASRForSpeechRecognition |
| Normalized output | ASROutput |
| Training contract | get_training_spec('asr_wenet') |
| Optimization lifecycle | available_optimization_passes, apply_optimization_plan, optimization_manifest, restore_optimization_plan |
See all model guides, inference, and the training matrix.