Export a WhisperAudioProcessor to a .pte file. Args: output_file: Output .pte file path. backend: Backend for partitioning ("xnnpack" or "mlx"). **model_kwargs: Passed to WhisperAudioProcessor constructor (e.g. feature_size, max_audio_len, stack_output, strea
(
output_file="whisper_preprocess.pte", backend="xnnpack", **model_kwargs
)
| 236 | |
| 237 | |
| 238 | def export_processor( |
| 239 | output_file="whisper_preprocess.pte", backend="xnnpack", **model_kwargs |
| 240 | ): |
| 241 | """Export a WhisperAudioProcessor to a .pte file. |
| 242 | |
| 243 | Args: |
| 244 | output_file: Output .pte file path. |
| 245 | backend: Backend for partitioning ("xnnpack" or "mlx"). |
| 246 | **model_kwargs: Passed to WhisperAudioProcessor constructor |
| 247 | (e.g. feature_size, max_audio_len, stack_output, streaming). |
| 248 | """ |
| 249 | model = WhisperAudioProcessor(**model_kwargs) |
| 250 | _export_processor_model(model, output_file, backend) |
| 251 | |
| 252 | |
| 253 | def main(): |
no test coverage detected