You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/learning-paths/servers-and-cloud-computing/whisper/whisper.md
+5-10Lines changed: 5 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ layout: "learningpathall"
10
10
11
11
## Before you begin
12
12
13
-
This Learning Path demonstrates how to run the whisper-large-v3-turbo model as an application that takes the audio input and computes the text transcript of it. The instructions in this Learning Path have been designed for Arm servers running Ubuntu 24.04 LTS. You need an Arm server instance with 32 cores, atleast 8GB of RAM and 32GB disk to run this example. The instructions have been tested on a AWS c8g.8xlarge instance.
13
+
This Learning Path demonstrates how to run the [whisper-large-v3-turbo model](https://huggingface.co/openai/whisper-large-v3-turbo) as an application that takes an audio input and computes the text transcript of it. The instructions in this Learning Path have been designed for Arm servers running Ubuntu 24.04 LTS. You need an Arm server instance with 32 cores, atleast 8GB of RAM and 32GB disk to run this example. The instructions have been tested on a AWS Graviton4 `c8g.8xlarge` instance.
You will use the Hugging Face `transformers` framework to help process the audio. It contains classes that configures the model, and prepares it for inference. `pipeline` is an end-to-end function for NLP tasks. In the code below, it's configured to do pre- and post-processing of the sample in this example, as well as running the actual inference.
62
62
63
-
Create a python file:
63
+
Using a file editor of your choice, create a python file named `whisper-application.py` with the content shown below:
64
64
65
-
```bash
66
-
vim whisper-application.py
67
-
```
68
-
69
-
Write the following code in the `whisper-application.py` file:
70
65
```python { file_name="whisper-application.py" }
71
66
import torch
72
67
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor, pipeline
Enable verbose mode for the output and run the script.
121
+
Enable verbose mode for the output and run the script:
127
122
128
123
```bash
129
124
export DNNL_VERBOSE=1
130
125
python3 whisper-application.py
131
126
```
132
127
133
-
You should see output similar to the image below with the log since we enabled verbose, transcript of the audio and the `Inference elapsed time`.
128
+
You should see output similar to the image below with a log output, transcript of the audio and the `Inference elapsed time`.
134
129
135
130

136
131
137
132
138
-
You've now run a benchmark on the Whisper model. Continue to the next section to configure flags to learn about performance-enhancing features.
133
+
You've now run the Whisper model successfully on your Arm-based CPU. Continue to the next section to configure flags that can increase the performance your running model.
0 commit comments