{
"audio": "https://replicate.delivery/pbxt/JiBzGreXRsrFOflc5MBJmutR400fO0rFuR87psZbY0Oq4JK3/test_sample_36sec_eng.wav"
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_cgI**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech:cae4655369236780e854a1e090c521186c01dab1f43945446092c3552623e26b",
{
input: {
audio: "https://replicate.delivery/pbxt/JiBzGreXRsrFOflc5MBJmutR400fO0rFuR87psZbY0Oq4JK3/test_sample_36sec_eng.wav"
}
}
);
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_cgI**********************************
This is your API token. Keep it to yourself.
import replicate
Run bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech:cae4655369236780e854a1e090c521186c01dab1f43945446092c3552623e26b",
input={
"audio": "https://replicate.delivery/pbxt/JiBzGreXRsrFOflc5MBJmutR400fO0rFuR87psZbY0Oq4JK3/test_sample_36sec_eng.wav"
}
)
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_cgI**********************************
This is your API token. Keep it to yourself.
Run bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech 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": "bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech:cae4655369236780e854a1e090c521186c01dab1f43945446092c3552623e26b",
"input": {
"audio": "https://replicate.delivery/pbxt/JiBzGreXRsrFOflc5MBJmutR400fO0rFuR87psZbY0Oq4JK3/test_sample_36sec_eng.wav"
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
{'female': 0.001602, 'male': 0.998398}{
"id": "6d73zfjb25bs2whlnjwkcgxzey",
"model": "bzikst/wav2vec2-large-xlsr-53-gender-recognition-librispeech",
"version": "cae4655369236780e854a1e090c521186c01dab1f43945446092c3552623e26b",
"input": {
"audio": "https://replicate.delivery/pbxt/JiBzGreXRsrFOflc5MBJmutR400fO0rFuR87psZbY0Oq4JK3/test_sample_36sec_eng.wav"
},
"logs": "",
"output": "{'female': 0.001602, 'male': 0.998398}",
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2023-10-16T22:12:48.256466Z",
"started_at": "2023-10-16T22:12:48.234786Z",
"completed_at": "2023-10-16T22:12:50.562683Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/6d73zfjb25bs2whlnjwkcgxzey/cancel",
"get": "https://api.replicate.com/v1/predictions/6d73zfjb25bs2whlnjwkcgxzey"
},
"metrics": {
"predict_time": 2.327897,
"total_time": 2.306217
}
}