Table of contents
With Replicate, you can run WhisperX in the cloud with one line of code.
You can run WhisperX with our official JavaScript client:
npm install replicate
Set the REPLICATE_API_TOKEN
environment variable:
export REPLICATE_API_TOKEN=<your-api-token>
Import and set up the client:
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run daanelson/whisperx using Replicate’s API:
const output = await replicate.run(
"daanelson/whisperx:latest",
{
input: {
"audio": "https://replicate.delivery/pbxt/J5r78wKSymorzW9idAbbbJ7iXQl9GddZTwfdX5OlLJW2hLR2/OSR_uk_000_0050_8k.wav",
"debug": False,
"only_text": False,
"batch_size": 32,
"align_output": False
}
}
);
console.log(output);
Note that WhisperX takes an audio file as input. You can provide URLs and or base 64 strings here as values for the image.
To learn more, take a look at the guide on getting started with Node.js.
You can run WhisperX with our official Python client:
pip install replicate
Set the REPLICATE_API_TOKEN
environment variable:
export REPLICATE_API_TOKEN=<your-api-token>
Run daanelson/whisperx using Replicate’s API:
import replicate
output = replicate.run(
"daanelson/whisperx:latest",
input={
"audio": "https://replicate.delivery/pbxt/J5r78wKSymorzW9idAbbbJ7iXQl9GddZTwfdX5OlLJW2hLR2/OSR_uk_000_0050_8k.wav",
"debug": False,
"only_text": False,
"batch_size": 32,
"align_output": False
}
)
print(output)
Note that WhisperX takes an audio file as input. You can provide URLs and or base 64 strings here as values for the image.
To learn more, take a look at the guide on getting started with Python.
You can call the HTTP API directly with tools like cURL:
Set the REPLICATE_API_TOKEN
environment variable:
export REPLICATE_API_TOKEN=<your-api-token>
Run daanelson/whisperx using Replicate’s API:
curl -s -X POST \
-H "Authorization: Token $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-d $'{
"version": "9aa6ecadd30610b81119fc1b6807302fd18ca6cbb39b3216f430dcf23618cedd",
"input": {
"audio": "https://replicate.delivery/pbxt/J5r78wKSymorzW9idAbbbJ7iXQl9GddZTwfdX5OlLJW2hLR2/OSR_uk_000_0050_8k.wav",
"debug": False,
"only_text": False,
"batch_size": 32,
"align_output": False
}
}' \
https://api.replicate.com/v1/models/daanelson/whisperx/predictions
Note that WhisperX takes an audio file as input. You can provide URLs and or base 64 strings here as values for the image.
To learn more, take a look at Replicate’s HTTP API reference docs.
You can also run WhisperX using other Replicate client libraries for Golang, Swift, Elixir, and others