Failed to load versions. Head to the versions page to see all versions for this model.
You're looking at a specific version of this model. Jump to the model overview.
Input
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run lucataco/csm-1b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"lucataco/csm-1b:e5223446b8f887df531a46461280b9352ffd58bdda729cbbc65f8991e93564a3",
{
input: {
text: "Hello, this is a test of the speech generation model",
speaker: 0,
max_audio_length_ms: 10000
}
}
);
// 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=<paste-your-token-here>
Find your API token in your account settings.
import replicate
Run lucataco/csm-1b using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"lucataco/csm-1b:e5223446b8f887df531a46461280b9352ffd58bdda729cbbc65f8991e93564a3",
input={
"text": "Hello, this is a test of the speech generation model",
"speaker": 0,
"max_audio_length_ms": 10000
}
)
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=<paste-your-token-here>
Find your API token in your account settings.
Run lucataco/csm-1b 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": "lucataco/csm-1b:e5223446b8f887df531a46461280b9352ffd58bdda729cbbc65f8991e93564a3",
"input": {
"text": "Hello, this is a test of the speech generation model",
"speaker": 0,
"max_audio_length_ms": 10000
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Add a payment method to run this model.
By signing in, you agree to our
terms of service and privacy policy
Output
- Chapters
- descriptions off, selected
- captions settings, opens captions settings dialog
- captions off, selected
This is a modal window.
Beginning of dialog window. Escape will cancel and close the window.
End of dialog window.
{
"completed_at": "2025-03-18T00:37:46.577319Z",
"created_at": "2025-03-18T00:31:46.756000Z",
"data_removed": false,
"error": null,
"id": "4ajtra748hrge0cnmtmtz25d68",
"input": {
"text": "Hello, this is a test of the speech generation model",
"speaker": 0,
"max_audio_length_ms": 10000
},
"logs": null,
"metrics": {
"predict_time": 25.88486081,
"total_time": 359.821319
},
"output": "https://replicate.delivery/czjl/ruWb7W4WDX4hC51kkTecko6zueIV6lix45SqtfpyVbeqlcmRB/output.wav",
"started_at": "2025-03-18T00:37:20.692459Z",
"status": "succeeded",
"urls": {
"stream": "https://stream.replicate.com/v1/files/fddq-7hbf5cg7fjxk3h6sweqtasd2wrbuck6u4fqx2q7zm5b4cgtcc7oa",
"get": "https://api.replicate.com/v1/predictions/4ajtra748hrge0cnmtmtz25d68",
"cancel": "https://api.replicate.com/v1/predictions/4ajtra748hrge0cnmtmtz25d68/cancel"
},
"version": "e5223446b8f887df531a46461280b9352ffd58bdda729cbbc65f8991e93564a3"
}