Closed sergiosolorzano closed 1 year ago
in case it helps anyone, whisper-tiny model expects audio_pcm input not audio_stream as shown in netron. so I changed Inference.cs input: var input = new List { //NamedOnnxValue.CreateFromTensor("audio_stream", config.audio), NamedOnnxValue.CreateFromTensor("audio_pcm", config.audio), and WhisperConfig.cs //public DenseTensor audio; public DenseTensor audio;
Hi, I've created whisper-tiny following microsoft's repo https://github.com/microsoft/Olive/tree/main/examples/whisper which work in linux following the repo explanations.
Model created: python prepare_whisper_configs.py --model_name openai/whisper-tiny.en --no_audio_decoder python -m olive.workflows.run --config whisper_cpu_int8.json --setup python -m olive.workflows.run --config whisper_cpu_int8.json
The model works in linux: python test_transcription.py --config whisper_cpu_int8.json
I then export model.onnx (from examples/whisper/models/whisper_cpu_int8.zip.zip generated in the olive repo above), place it in the Whisper-HybridLoop-Onnx-Demo, run it for ExecutionProvider Cpu, and I get this error:
'[ErrorCode:InvalidArgument] Input name: 'audio_stream' is not in the metadata'
It throws when it reaches var result = session.Run(input, outputs, run_options); in Inference.cs
OnnxRuntime.Extensions is reference in csproj (also tested v 0.8.0) `