Step-Audio 2 is an advanced, end-to-end multi-modal large language model designed to transform how we interact with audio. It goes beyond simple transcription, offering a deep, nuanced understanding of speech and audio environments. Think of a model that not only comprehends the words in a conversation but also grasps the para-linguistic things like tone and emotion, and even recognizes non-vocal information like background noise. This advanced capability allows for highly sophisticated audio analysis, making it a promising solution for complex tasks like customer service automation, content analysis, and real-time conversational agents. Step-Audio 2’s unique ability to reason about and act upon this rich acoustic data places it at the forefront of audio AI, promising a level of intelligence and contextual awareness that has been a challenge for previous models.
In this article, we’ll dive step-by-step into the process of installing and running this model via Gradio locally or in GPU-acclerated environments.
Step-by-step process to install and run Step-Audio 2
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using 1x RTX A6000 GPU, however, you can choose any GPU as per the prerequisites.
- Similarly, we’ll opt for 200GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available GPU nodes in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x RTX A6000 48GB GPU node with 64vCPUs/63GB RAM/200GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step is to choose an image for the VM, which in our case is Nvidia Cuda.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right, click on Connect with SSH, and copy the SSH details that appear.
As you copy the details, follow the below steps to connect to the running GPU VM via SSH:
- Open your terminal, paste the SSH command, and run it.
2. In some cases, your terminal may take your consent before connecting. Enter ‘yes’.
3. A prompt will request a password. Type the SSH password, and you should be connected.
Output:
Next, If you want to check the GPU details, run the following command in the terminal:
!nvidia-smi
Step 7: Set up the project environment with dependencies
- Create a virtual environment using Anaconda.
conda create -n step python=3.11 -y && conda activate step
Output:
2. Install required dependencies.
pip install torch>=2.3.0 --index-url https://download.pytorch.org/whl/cu121
pip install transformers==4.49.0 torchaudio librosa onnxruntime s3tokenizer diffusers hyperpyyaml
pip install gradio
apt-get update
apt-get install git-lfs
Output:
3. Clone the official repo of stepfun-ai/Step-Audio2
.
git clone https://github.com/stepfun-ai/Step-Audio2.git && cd Step-Audio2
4. Initialized git lfs
and install model checkpoints.
git lfs install
git clone https://huggingface.co/stepfun-ai/Step-Audio-2-mini
Output:
Step 8: Run the Model with Gradio
- Launch the Gradio demo.
python web_demo.py
2. If you’re on a remote machine (e.g., NodeShift GPU), you’ll need to do SSH port forwarding in order to access the Gradio session on your local browser.
Run the following command in your local terminal after replacing:
<YOUR_SERVER_PORT>
with the PORT allotted to your remote server (For the NodeShift server – you can find it in the deployed GPU details on the dashboard).
<PATH_TO_SSH_KEY>
with the path to the location where your SSH key is stored.
<YOUR_SERVER_IP>
with the IP address of your remote server.
ssh -L 7862:localhost:7862 -p <YOUR_SERVER_PORT> -i <PATH_TO_SSH_KEY> root@<YOUR_SERVER_IP>
After this copy the URL you received in your remote server: http://localhost:7862
And paste this on your local browser to access the Gradio session.
3. This is how the interface looks.
4. Give the model an input in the form of speech or text to get the output speech.
Conclusion
Successfully installing Step-Audio 2 locally provides you with a powerful, end-to-end multi-modal large language model capable of advanced audio understanding, including paralinguistic cues and non-vocal information. By following the steps outlined, you’ve gained the ability to run sophisticated audio analysis and intelligent speech conversation models on your own system. For those seeking to deploy this model in a scalable, high-performance environment, NodeShift Cloud offers a solution by providing pre-configured, GPU-accelerated infrastructure. This allows you to bypass complex setup processes and harness the full power of Step-Audio 2’s capabilities fast and at scale without the limitations of local hardware.