Skip to content

Commit 51de5e8

Browse files
authored
openvino : update model conversion and README.md (#4003)
This commit updates the OpenVINO model conversion script and its dependencies as they were currently not working. The first issue was an import that needed updating for fix the following error: ```console (openvino_conv_env) $ python convert-whisper-to-openvino.py --model base.en Traceback (most recent call last): File "/home/danbev/work/ai/whisper-work/models/convert-whisper-to-openvino.py", line 6, in <module> from openvino.runtime import serialize ModuleNotFoundError: No module named 'openvino.runtime' ``` And after that there was a missing dependency: ```console ModuleNotFoundError: No module named 'onnxscript' ``` With the changes in this commit I was able to successfully convert the model and run the inference using OpenVINO.
1 parent 3391d6b commit 51de5e8

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -267,20 +267,20 @@ This can result in significant speedup in encoder performance. Here are the inst
267267

268268
- Build `whisper.cpp` with OpenVINO support:
269269

270-
Download OpenVINO package from [release page](https://github.com/openvinotoolkit/openvino/releases). The recommended version to use is [2024.6.0](https://github.com/openvinotoolkit/openvino/releases/tag/2024.6.0). Ready to use Binaries of the required libraries can be found in the [OpenVino Archives](https://storage.openvinotoolkit.org/repositories/openvino/packages/2024.6/)
270+
Download OpenVINO package from [release page](https://github.com/openvinotoolkit/openvino/releases). The recommended version to use is [2026.3.0](https://github.com/openvinotoolkit/openvino/releases/tag/2026.3.0). Ready to use Binaries of the required libraries can be found in the [OpenVino Archives](https://storage.openvinotoolkit.org/repositories/openvino/packages/2026.3/)
271271

272272
After downloading & extracting package onto your development system, set up required environment by sourcing setupvars script. For example:
273273

274274
Linux:
275275

276276
```bash
277-
source /path/to/l_openvino_toolkit_ubuntu22_2023.0.0.10926.b4452d56304_x86_64/setupvars.sh
277+
source /path/to/openvino_toolkit_ubuntu/setupvars.sh
278278
```
279279

280280
Windows (cmd):
281281

282282
```powershell
283-
C:\Path\To\w_openvino_toolkit_windows_2023.0.0.10926.b4452d56304_x86_64\setupvars.bat
283+
C:\Path\To\openvino_toolkit_windows\setupvars.bat
284284
```
285285

286286
And then build the project using cmake:

models/convert-whisper-to-openvino.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from whisper import load_model
44
import os
55
from openvino.frontend import FrontEndManager
6-
from openvino.runtime import serialize
6+
from openvino import serialize
77
import shutil
88

99
def convert_encoder(hparams, encoder, mname):

models/requirements-openvino.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
openvino>=2023.3.0
22
openai-whisper
3+
onnxscript

0 commit comments

Comments
 (0)