কনটেন্টে যান

xAI Text to Speech

ইন্টিগ্রেট করুন

মডেল id xai/tts/v1
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

এই অনুরোধ: ০.০০১$ ১ API ক্রেডিট এই পেজে চালান

API কী পান

বিল্ট-ইন ভয়েস, ভাষা নির্বাচন এবং ইনলাইন অভিব্যক্তিপূর্ণ স্পিচ ট্যাগ-সহ টেক্সট-টু-স্পিচ

xAI · অডিও

আপনার প্রথম ফলাফল এখানে আসবে

নিচে একটি রিকোয়েস্ট তৈরি করে আপনার API কী দিয়ে চালান। আউটপুট আমাদের স্টোরেজে কপি করা হয়, চিরকাল বা বিনামূল্যে ৭ দিন পর্যন্ত রাখা হয়।

একটি অনুরোধ তৈরি করুন

মডেল স্কিমা থেকে কন্ট্রোল তৈরি করা হয়। এগুলো পরিবর্তন করলে কোড ও মূল্য আপডেট হয়।

•আবশ্যক 50 / 15000

স্পিচ-সিন্থেসিসের টেক্সট, যার অভিব্যক্তিপূর্ণ উপস্থাপনা ইনলাইন ট্যাগ ([laugh], [pause], [sigh]) অথবা র‍্যাপিং ট্যাগ (<whisper>text</whisper>, <slow>text</slow>)-এর মাধ্যমে নিয়ন্ত্রিত হয়। ইনপুট 15,000 অক্ষরের বেশি হতে পারবে না।

অ্যাডভান্সড voice · language · enable_safety_checker · output_format
ডিফল্ট eve

স্পিচ-সিন্থেসিসের জন্য নির্বাচিত বিল্ট-ইন ভয়েস।

ডিফল্ট auto

এই BCP-47 কোডগুলো থেকে ভাষা নির্বাচন: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE। স্বয়ংক্রিয় শনাক্তকরণের জন্য 'auto' প্রদান করুন।

জেনারেট করা অডিওর ফরম্যাট কনফিগারেশন; ডিফল্ট হলো 24 kHz স্যাম্পল রেট এবং 128 kbps বিটরেটের MP3।

POST /run/xai/tts/v1?wait=20 মূল্য → ০.০০১$
# Run the model; wait up to 20 s for the finished result in the same call
curl -X POST "https://api.doitong.com/v1/run/xai/tts/v1?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from Doitong. This is a short test sentence."
  }'

# Still "queued" or "running"? Poll with the id from the response:
curl "https://api.doitong.com/v1/requests/REQUEST_ID?wait=20" \
  -H "Authorization: Bearer $DOITONG_API_KEY"

এই অনুরোধ চালান

আপনার key এই ব্রাউজারেই থাকে: এটি শুধু Doitong API-তে পাঠানো হয় এবং Remember টিক দিলে কেবল localStorage-এ সংরক্ষিত হয়। একটি API কী পান

xAI Text to Speech সম্পর্কে

সর্বোচ্চ 15,000 অক্ষরের টেক্সটকে স্পিচে রূপান্তর করে। 28টি বিল্ট-ইন ভয়েস এবং একটি ভাষা কোড বা স্বয়ংক্রিয় শনাক্তকরণ থেকে বেছে নিন। এক্সপ্রেসিভ ডেলিভারির জন্য টেক্সটে [laugh], [pause] এবং [sigh]-এর মতো ট্যাগ, অথবা <whisper> এবং <slow>-এর মতো র‍্যাপিং ট্যাগ থাকতে পারে। `output_format` অডিও ফাইল কনফিগার করে।

প্যারামিটার

নামধরন ডিফল্টঅনুমোদিত বিবরণ
textআবশ্যক
ধরনstring
≤ ১৫,০০০টি অক্ষর
স্পিচ-সিন্থেসিসের টেক্সট, যার অভিব্যক্তিপূর্ণ উপস্থাপনা ইনলাইন ট্যাগ ([laugh], [pause], [sigh]) অথবা র‍্যাপিং ট্যাগ (<whisper>text</whisper>, <slow>text</slow>)-এর মাধ্যমে নিয়ন্ত্রিত হয়। ইনপুট 15,000 অক্ষরের বেশি হতে পারবে না।
voiceঐচ্ছিক
ধরনenum
ডিফল্টeve
carinazaganhelixorionlunairisaltairzenithperseusheliosluxkeplerrigelcosmocelesteursa
+12টি আরওsiriuslumencastornakshatlasauroralioraaraeveleorexsal
স্পিচ-সিন্থেসিসের জন্য নির্বাচিত বিল্ট-ইন ভয়েস।
languageঐচ্ছিক
ধরনenum
ডিফল্টauto
autoenar-EGar-SAar-AEbnzhfrdehiiditjakopt-BRpt-PT
+5টি আরওrues-MXes-EStrvi
এই BCP-47 কোডগুলো থেকে ভাষা নির্বাচন: en, zh, fr, de, hi, id, it, ja, ko, pt-BR, pt-PT, ru, es-MX, es-ES, tr, vi, bn, ar-EG, ar-SA, ar-AE। স্বয়ংক্রিয় শনাক্তকরণের জন্য 'auto' প্রদান করুন।
output_formatঐচ্ছিক
ধরনobject
জেনারেট করা অডিওর ফরম্যাট কনফিগারেশন; ডিফল্ট হলো 24 kHz স্যাম্পল রেট এবং 128 kbps বিটরেটের MP3।
output_format.codecঐচ্ছিক
ধরনenum
ডিফল্টmp3
mp3wavpcmmulawalaw
অডিও এনকোডিংয়ের কোডেক; উপলভ্য পছন্দগুলো হলো mp3, wav, pcm, mulaw, alaw।
output_format.sample_rateঐচ্ছিক
ধরনenum
ডিফল্ট24000
80001600022050240004410048000
Hz-এ পরিমাপ করা অডিও স্যাম্পলিং ফ্রিকোয়েন্সি।
output_format.bit_rateঐচ্ছিক
ধরনenum
320006400096000128000192000
MP3 আউটপুটের বিটরেট, ডিফল্ট 128000 এবং bps-এ পরিমাপ করা হয়; এটি অন্যান্য কোডেকের ক্ষেত্রে প্রযোজ্য নয়।
enable_safety_checkerঐচ্ছিক
ধরনboolean
ডিফল্টtrue
কলকারী অনুমোদিত হলে false সেট করে স্ক্রিনিং শিথিল করা যায়।
আবশ্যক

আউটপুট

GET /requests/req_8k2m4q7x1z9c3v5b6n0p2r4t
{
  "id": "req_8k2m4q7x1z9c3v5b6n0p2r4t",
  "object": "request",
  "model": "xai/tts/v1",
  "status": "succeeded",
  "created_at": "2026-10-20T12:00:00Z",
  "started_at": "2026-10-20T12:00:02Z",
  "completed_at": "2026-10-20T12:00:09Z",
  "queue_position": null,
  "cost": {
    "credits": 1,
    "usd": "0.001",
    "charged": 1,
    "refunded": 0
  },
  "input": {
    "text": "Hello from Doitong. This is a short test sentence."
  },
  "output": {
    "audio": {
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_name": "0-output.mp3",
      "file_size": 1843200
    }
  },
  "outputs": [
    {
      "type": "audio",
      "url": "https://content.doitong.com/dev-api/2026/10/20/req_8k2m4q7x1z9c3v5b6n0p2r4t/0-output.mp3",
      "content_type": "audio/mpeg",
      "file_size": 1843200,
      "duration": 12,
      "stored": true
    }
  ],
  "error": null,
  "metrics": {
    "inference_seconds": 6.8
  },
  "urls": {
    "self": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t",
    "cancel": "https://api.doitong.com/v1/requests/req_8k2m4q7x1z9c3v5b6n0p2r4t/cancel"
  }
}
আপনার ফাইল, আপনার পছন্দপ্রতিটি outputs[].url আমাদের স্টোরেজে একটি কপি: চিরকাল রাখা হয় (প্রতি GB-মাস অনুযায়ী অর্থপ্রদত্ত) অথবা অ্যাকাউন্ট সেটিংস বা ?storage= অনুযায়ী বিনামূল্যে ৭ দিন পর্যন্ত।
প্রতিটি মডেলে একই গঠনছবি, ভিডিও এবং অডিও—সব ক্ষেত্রেই type, url, content_type, width, height এবং duration। output হলো মডেলের নিজস্ব ফলাফল অবজেক্ট।
আউটপুটের ফিল্ড
audio
object {url, content_type, file_name, file_size}জেনারেশনের মাধ্যমে তৈরি অডিও ফাইল।

AI এজেন্টদের জন্য: এই পৃষ্ঠাটি Markdown হিসেবে এখানে আছে https://doitong.com/bn/developers/models/xai/tts/v1.md. সব মডেল ও গাইড: https://doitong.com/developers/llms.txt