Views
No views yet
| File | Description |
|---|---|
hi.xml | OpenVINO IR model topology |
hi.bin | OpenVINO IR model weights (FP16) |
hi.json | Token vocabulary - a JSON array where each token's index is its model output id. Word-boundary marker is ▁ (U+2581, SentencePiece convention). |
len(vocab), i.e. one past the last
entry in hi.json - it is not itself listed in the file.n_fft=512, hop_length=160, win_length=400, hann windowvocab_size + 1 (vocabulary + blank)1import numpy as np
2import openvino as ov
3
4core = ov.Core()
5model = core.read_model("hi.xml")
6compiled = core.compile_model(model, "CPU")
7infer_request = compiled.create_infer_request()
8
9# mel_batch: float16 [1, 80, T] log-mel spectrogram built with the frontend
10# config above; mel_length: int64 [1] = T
11infer_request.infer(inputs={"audio_signal": mel_batch, "length": mel_length})
12logits = infer_request.get_output_tensor(0).data # [1, T', vocab_size + 1]
13
14ids = np.argmax(logits[0], axis=-1)len(vocab)), then map remaining ids through
hi.json and replace ▁ with a space.