typefile
{
"audio": "https://replicate.delivery/pbxt/IZruuPAVCQh1lI25MIihRwFHN4MvjH7xcBTgnbXUDM1CAY7m/lex-levin-4min.mp3"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Zjn**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run meronym/speaker-transcription using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"meronym/speaker-transcription:12483517b558629508e03bed77e9c46c6f6e5756715af2b3a4f741f70be45575",
{
input: {
audio: "https://replicate.delivery/pbxt/IZruuPAVCQh1lI25MIihRwFHN4MvjH7xcBTgnbXUDM1CAY7m/lex-levin-4min.mp3"
}
}
);
// To access the file URL:
console.log(output.url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", 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_Zjn**********************************
This is your API token. Keep it to yourself.
import replicate
Run meronym/speaker-transcription using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"meronym/speaker-transcription:12483517b558629508e03bed77e9c46c6f6e5756715af2b3a4f741f70be45575",
input={
"audio": "https://replicate.delivery/pbxt/IZruuPAVCQh1lI25MIihRwFHN4MvjH7xcBTgnbXUDM1CAY7m/lex-levin-4min.mp3"
}
)
# To access the file URL:
print(output.url())
#=> "http://example.com"
# To write the file to disk:
with open("my-image.png", "wb") as file:
file.write(output.read())
To learn more, take a look at the guide on getting started with Python.
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_Zjn**********************************
This is your API token. Keep it to yourself.
Run meronym/speaker-transcription 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": "meronym/speaker-transcription:12483517b558629508e03bed77e9c46c6f6e5756715af2b3a4f741f70be45575",
"input": {
"audio": "https://replicate.delivery/pbxt/IZruuPAVCQh1lI25MIihRwFHN4MvjH7xcBTgnbXUDM1CAY7m/lex-levin-4min.mp3"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{
"id": "tuaf755pz5cdjixeyhnb5znqja",
"model": "meronym/speaker-transcription",
"version": "12483517b558629508e03bed77e9c46c6f6e5756715af2b3a4f741f70be45575",
"input": {
"audio": "https://replicate.delivery/pbxt/IZruuPAVCQh1lI25MIihRwFHN4MvjH7xcBTgnbXUDM1CAY7m/lex-levin-4min.mp3"
},
"logs": "pre-processing audio file...\ndiarizing audio file...\npost-processing diarization...\ntranscribing segments...\ntranscribing segment 0:00:00.497812 to 0:00:09.779063\ntranscribing segment 0:00:09.863438 to 0:03:34.962188",
"output": "https://replicate.delivery/pbxt/bQnqvRJCBRo8DNia8APcYivhjFSbel0DWZGlvjCiG5OusxWIA/output.json",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-04-01T19:20:58.876052Z",
"started_at": "2023-04-01T19:20:59.181923Z",
"completed_at": "2023-04-01T19:22:04.444124Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/tuaf755pz5cdjixeyhnb5znqja/cancel",
"get": "https://api.replicate.com/v1/predictions/tuaf755pz5cdjixeyhnb5znqja"
},
"metrics": {
"predict_time": 65.262201,
"total_time": 65.568072
}
}