typefile
{
"audio": "https://replicate.delivery/pbxt/Lv9UNQISI5TvC443clsryKIEOD3LLgHqh8rsNcnKokVSZGV9/audio.mp3",
"script": "The whole city burned to the ground in a matter of hours!"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2Kz**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run quinten-kamphuis/forced-alignment using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"quinten-kamphuis/forced-alignment:566a5a9530375ba0428344b66027520e83f832527bc04c5c4770cea1d3e6fcc7",
{
input: {
audio: "https://replicate.delivery/pbxt/Lv9UNQISI5TvC443clsryKIEOD3LLgHqh8rsNcnKokVSZGV9/audio.mp3",
script: "The whole city burned to the ground in a matter of hours!"
}
}
);
console.log(output);
To learn more, take a look at the guide on getting started with Node.js.
pip install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2Kz**********************************
This is your API token. Keep it to yourself.
import replicate
Run quinten-kamphuis/forced-alignment using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"quinten-kamphuis/forced-alignment:566a5a9530375ba0428344b66027520e83f832527bc04c5c4770cea1d3e6fcc7",
input={
"audio": "https://replicate.delivery/pbxt/Lv9UNQISI5TvC443clsryKIEOD3LLgHqh8rsNcnKokVSZGV9/audio.mp3",
"script": "The whole city burned to the ground in a matter of hours!"
}
)
print(output)
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_2Kz**********************************
This is your API token. Keep it to yourself.
Run quinten-kamphuis/forced-alignment using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
curl -s -X POST \
-H "Authorization: Bearer $REPLICATE_API_TOKEN" \
-H "Content-Type: application/json" \
-H "Prefer: wait" \
-d $'{
"version": "quinten-kamphuis/forced-alignment:566a5a9530375ba0428344b66027520e83f832527bc04c5c4770cea1d3e6fcc7",
"input": {
"audio": "https://replicate.delivery/pbxt/Lv9UNQISI5TvC443clsryKIEOD3LLgHqh8rsNcnKokVSZGV9/audio.mp3",
"script": "The whole city burned to the ground in a matter of hours!"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "y7cedt8zsdrg80cjzpsag6e80w",
"model": "quinten-kamphuis/forced-alignment",
"version": "566a5a9530375ba0428344b66027520e83f832527bc04c5c4770cea1d3e6fcc7",
"input": {
"audio": "https://replicate.delivery/pbxt/Lv9UNQISI5TvC443clsryKIEOD3LLgHqh8rsNcnKokVSZGV9/audio.mp3",
"script": "The whole city burned to the ground in a matter of hours!"
},
"logs": "",
"output": [
{
"end": 0.16045197740112993,
"start": 0.08022598870056497,
"word": "The"
},
{
"end": 0.4011299435028248,
"start": 0.2807909604519774,
"word": "whole"
},
{
"end": 0.6418079096045197,
"start": 0.501412429378531,
"word": "city"
},
{
"end": 0.8223163841807909,
"start": 0.7019774011299434,
"word": "burned"
},
{
"end": 1.083050847457627,
"start": 0.9025423728813559,
"word": "to"
},
{
"end": 1.243502824858757,
"start": 1.1231638418079095,
"word": "the"
},
{
"end": 1.5644067796610168,
"start": 1.4440677966101694,
"word": "ground"
},
{
"end": 1.6847457627118643,
"start": 1.5644067796610168,
"word": "in"
},
{
"end": 1.9655367231638416,
"start": 1.7248587570621468,
"word": "a"
},
{
"end": 2.166101694915254,
"start": 1.9855932203389828,
"word": "matter"
},
{
"end": 2.3466101694915253,
"start": 2.1861581920903954,
"word": "of"
},
{
"end": 2.527118644067796,
"start": 2.406779661016949,
"word": "hours!"
}
],
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-11-05T18:59:22.187Z",
"started_at": "2024-11-05T18:59:22.202605Z",
"completed_at": "2024-11-05T18:59:22.394078Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/y7cedt8zsdrg80cjzpsag6e80w/cancel",
"get": "https://api.replicate.com/v1/predictions/y7cedt8zsdrg80cjzpsag6e80w",
"web": "https://replicate.com/p/y7cedt8zsdrg80cjzpsag6e80w"
},
"metrics": {
"predict_time": 0.191472425,
"total_time": 0.207078
}
}