typefile
{
"input_audio": "https://replicate.delivery/pbxt/LfbhsklJg0LQqTpm3AIM0YQqP5p30J4BDTJMq4HFumAVUW3U/vicuna_4.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0,
"top_p": 0
}npm install replicate
REPLICATE_API_TOKEN environment variable:export REPLICATE_API_TOKEN=r8_MTP**********************************
This is your API token. Keep it to yourself.
import Replicate from "replicate";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run ictnlp/llama-omni using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
{
input: {
input_audio: "https://replicate.delivery/pbxt/LfbhsklJg0LQqTpm3AIM0YQqP5p30J4BDTJMq4HFumAVUW3U/vicuna_4.wav",
max_new_tokens: 256,
prompt: "Please directly answer the questions in the user's speech",
temperature: 0,
top_p: 0
}
}
);
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_MTP**********************************
This is your API token. Keep it to yourself.
import replicate
Run ictnlp/llama-omni using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
output = replicate.run(
"ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
input={
"input_audio": "https://replicate.delivery/pbxt/LfbhsklJg0LQqTpm3AIM0YQqP5p30J4BDTJMq4HFumAVUW3U/vicuna_4.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0,
"top_p": 0
}
)
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_MTP**********************************
This is your API token. Keep it to yourself.
Run ictnlp/llama-omni 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": "ictnlp/llama-omni:36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
"input": {
"input_audio": "https://replicate.delivery/pbxt/LfbhsklJg0LQqTpm3AIM0YQqP5p30J4BDTJMq4HFumAVUW3U/vicuna_4.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user\'s speech",
"temperature": 0,
"top_p": 0
}
}' \
https://api.replicate.com/v1/predictions
To learn more, take a look at Replicate’s HTTP API reference docs.
Object output with 2 properties
To increase productivity while working from home, create a dedicated workspace, set a schedule, minimize distractions, and take regular breaks. Stay focused and prioritize tasks to achieve more in less time.
{
"id": "h37rz8yhxsrgj0cj3ga8njq4gm",
"model": "ictnlp/llama-omni",
"version": "36c9bcf70a56f40d9a27445c30c769308b18180296749f86ec9b682baf7ad351",
"input": {
"input_audio": "https://replicate.delivery/pbxt/LfbhsklJg0LQqTpm3AIM0YQqP5p30J4BDTJMq4HFumAVUW3U/vicuna_4.wav",
"max_new_tokens": 256,
"prompt": "Please directly answer the questions in the user's speech",
"temperature": 0,
"top_p": 0
},
"logs": "/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\n/root/.pyenv/versions/3.10.15/lib/python3.10/site-packages/transformers/utils/hub.py:127: FutureWarning: Using `TRANSFORMERS_CACHE` is deprecated and will be removed in v5 of Transformers. Use `HF_HOME` instead.\nwarnings.warn(\nTo increase productivity while working from home, create a dedicated workspace, set a schedule, minimize distractions, and take regular breaks. Stay focused and prioritize tasks to achieve more in less time.\noutput_units: 79 868 220 483 328 409 914 468 678 485 948 32 835 67 337 243 850 973 288 750 104 901 921 503 487 219 952 471 737 333 234 523 50 53 321 458 787 935 101 741 837 81 693 521 787 935 101 741 969 660 351 501 398 212 455 143 390 515 647 366 896 627 470 821 908 380 896 627 168 343 44 115 121 111 128 914 119 678 485 113 327 822 89 194 664 506 944 423 565 734 196 537 721 250 384 879 166 250 161 487 319 501 137 822 89 194 664 599 161 523 555 233 787 935 101 741 969 934 219 107 85 519 589 337 126 323 576 822 89 194 664 835 67 297 265 675 237 307 128 665 780 519 26 204 280 576 384 879 945 944 878 423 565 742 98 519 589 126 137 576 384 879 523 196 166 705 11 74 716 205 521 524 44 115 752 111 128 665 991 162 73 172 871 333 179 961 428 754 748 872 336 359 655 837 81 198 711 124 884 250 333 432 742 170 589 600 728 647 167 761 430 70 219 727 146 283 832 758 711 510 265 675 237 823 175 684 136 38 105 244 583 576 822 89 194 664 990 107 233 156 824 442 879 487 350 836 74 228 259 453 402 663 969 870 290 978 647 822 89 194 664 990 107 545 85 297 265 675 237 415 772 497 780 589 702 576 822 89 194 664 958 390 479 330 776 435 908 380 382 268 501 860 137 333 32 835 683 67 940 118 64 944 175 684 136 481 973 288 796 750 837 81 327 635 894 764 466 969 523 185 403 75 583 874 167 655 837 81 198 835 683 67 940 884 244 583 576 761 907 430 70 835 67 940 118 107 545 85 297 884 79 868 220 483 734 793 105 326 531 976 534 485 321 948 86 885 692 148 243 889 324 826 592 103 969 25 771 46 812 222 915 781 645 384 879 70 835 67 940 884 244 583 874 167 655 764 837 81 377 627 385 584 902 415 497\n<class 'str'>",
"output": {
"audio": "https://replicate.delivery/pbxt/jXGGf9uias32ISB9e7sCxSZQXgHYmdcXjLMXPe4DSkT2ZLfNB/out.wav",
"text": "To increase productivity while working from home, create a dedicated workspace, set a schedule, minimize distractions, and take regular breaks. Stay focused and prioritize tasks to achieve more in less time."
},
"data_removed": false,
"error": null,
"source": "web",
"status": "succeeded",
"created_at": "2024-09-22T23:32:59.502Z",
"started_at": "2024-09-22T23:32:59.600245Z",
"completed_at": "2024-09-22T23:33:16.222087Z",
"urls": {
"cancel": "https://api.replicate.com/v1/predictions/h37rz8yhxsrgj0cj3ga8njq4gm/cancel",
"get": "https://api.replicate.com/v1/predictions/h37rz8yhxsrgj0cj3ga8njq4gm",
"web": "https://replicate.com/p/h37rz8yhxsrgj0cj3ga8njq4gm"
},
"metrics": {
"predict_time": 16.621842295,
"total_time": 16.720087
}
}