[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-runway-rw-integrate-audio":3,"mdc--j8by8i-key":38,"related-org-runway-rw-integrate-audio":2741,"related-repo-runway-rw-integrate-audio":2901},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":27,"repoUrl":28,"updatedAt":29,"license":30,"forks":31,"topics":32,"repo":33,"sourceUrl":36,"mdContent":37},"rw-integrate-audio","integrate Runway audio APIs","Help users integrate Runway audio APIs (TTS, sound effects, voice isolation, dubbing)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"runway","Runway","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Frunway.png","runwayml",[13,17,18,21,24],{"name":14,"slug":15,"type":16},"Creative","creative","tag",{"name":9,"slug":8,"type":16},{"name":19,"slug":20,"type":16},"Audio","audio",{"name":22,"slug":23,"type":16},"API Development","api-development",{"name":25,"slug":26,"type":16},"Speech","speech",57,"https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills","2026-04-08T04:42:10.081814",null,15,[],{"repoUrl":28,"stars":27,"forks":31,"topics":34,"description":35},[],"for Runway coding agent skills","https:\u002F\u002Fgithub.com\u002Frunwayml\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Frw-integrate-audio","---\nname: rw-integrate-audio\ndescription: \"Help users integrate Runway audio APIs (TTS, sound effects, voice isolation, dubbing)\"\nuser-invocable: false\nallowed-tools: Read, Grep, Glob, Edit, Write\n---\n\n# Integrate Audio Generation\n\n> **PREREQUISITE:** Run `+rw-check-compatibility` first. Run `+rw-fetch-api-reference` to load the latest API reference before integrating. Requires `+rw-setup-api-key` for API credentials. Requires `+rw-integrate-uploads` for local audio\u002Fvideo files.\n\nHelp users add Runway audio generation to their server-side code.\n\n## Available Models\n\n| Model | Endpoint | Use Case | Cost |\n|-------|----------|----------|------|\n| `eleven_multilingual_v2` | `POST \u002Fv1\u002Ftext_to_speech` | Text to speech | 1 credit\u002F50 chars |\n| `eleven_text_to_sound_v2` | `POST \u002Fv1\u002Fsound_effect` | Sound effect generation | 1-2 credits |\n| `eleven_voice_isolation` | `POST \u002Fv1\u002Fvoice_isolation` | Isolate voice from audio | 1 credit\u002F6 sec |\n| `eleven_voice_dubbing` | `POST \u002Fv1\u002Fvoice_dubbing` | Dub audio to other languages | 1 credit\u002F2 sec |\n| `eleven_multilingual_sts_v2` | `POST \u002Fv1\u002Fspeech_to_speech` | Voice conversion | 1 credit\u002F3 sec |\n\n## Text-to-Speech\n\nGenerate speech from text using the ElevenLabs multilingual model.\n\n### Node.js SDK\n\n```javascript\nimport RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst task = await client.textToSpeech.create({\n  model: 'eleven_multilingual_v2',\n  promptText: 'Hello, welcome to our application!',\n  voice: { type: 'runway-preset', presetId: 'Maya' }\n}).waitForTaskOutput();\n\nconst audioUrl = task.output[0];\n```\n\n### Python SDK\n\n```python\nfrom runwayml import RunwayML\n\nclient = RunwayML()\n\ntask = client.text_to_speech.create(\n    model='eleven_multilingual_v2',\n    prompt_text='Hello, welcome to our application!',\n    voice={ 'type': 'runway-preset', 'presetId': 'Maya' }\n).wait_for_task_output()\n\naudio_url = task.output[0]\n```\n\n## Sound Effects\n\nGenerate sound effects from text descriptions.\n\n```javascript\nconst task = await client.soundEffect.create({\n  model: 'eleven_text_to_sound_v2',\n  promptText: 'Thunder rolling across a stormy sky'\n}).waitForTaskOutput();\n```\n\n```python\ntask = client.sound_effect.create(\n    model='eleven_text_to_sound_v2',\n    prompt_text='Thunder rolling across a stormy sky'\n).wait_for_task_output()\n```\n\n## Voice Isolation\n\nExtract voice from audio with background noise.\n\n```javascript\n\u002F\u002F If using a local file, upload first\nconst upload = await client.uploads.createEphemeral(\n  fs.createReadStream('\u002Fpath\u002Fto\u002Fnoisy-audio.mp3')\n);\n\nconst task = await client.voiceIsolation.create({\n  model: 'eleven_voice_isolation',\n  audioUri: upload.runwayUri\n}).waitForTaskOutput();\n```\n\n## Voice Dubbing\n\nDub audio\u002Fvideo into other languages.\n\n```javascript\nconst task = await client.voiceDubbing.create({\n  model: 'eleven_voice_dubbing',\n  audioUri: 'https:\u002F\u002Fexample.com\u002Fspeech.mp3',\n  targetLang: 'es'  \u002F\u002F Spanish\n}).waitForTaskOutput();\n```\n\n## Speech-to-Speech\n\nConvert one voice to another.\n\n```javascript\nconst task = await client.speechToSpeech.create({\n  model: 'eleven_multilingual_sts_v2',\n  media: { type: 'audio', uri: 'https:\u002F\u002Fexample.com\u002Foriginal-speech.mp3' },\n  voice: { type: 'runway-preset', presetId: 'Noah' }\n}).waitForTaskOutput();\n```\n\n## Integration Pattern\n\n### Express.js — Text-to-Speech Endpoint\n\n```javascript\nimport RunwayML from '@runwayml\u002Fsdk';\nimport express from 'express';\n\nconst client = new RunwayML();\nconst app = express();\napp.use(express.json());\n\napp.post('\u002Fapi\u002Ftext-to-speech', async (req, res) => {\n  try {\n    const { text, voiceId } = req.body;\n\n    const task = await client.textToSpeech.create({\n      model: 'eleven_multilingual_v2',\n      promptText: text,\n      voice: { type: 'runway-preset', presetId: voiceId || 'Maya' }\n    }).waitForTaskOutput();\n\n    res.json({ audioUrl: task.output[0] });\n  } catch (error) {\n    console.error('TTS failed:', error);\n    res.status(500).json({ error: error.message });\n  }\n});\n```\n\n### FastAPI — Sound Effects\n\n```python\nfrom fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom runwayml import RunwayML\n\napp = FastAPI()\nclient = RunwayML()\n\nclass SoundRequest(BaseModel):\n    prompt: str\n\n@app.post(\"\u002Fapi\u002Fsound-effect\")\nasync def generate_sound(req: SoundRequest):\n    try:\n        task = client.sound_effect.create(\n            model='eleven_text_to_sound_v2',\n            prompt_text=req.prompt\n        ).wait_for_task_output()\n        return {\"audio_url\": task.output[0]}\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e))\n```\n\n## Tips\n\n- **Output URLs expire in 24-48 hours.** Download audio files to your own storage.\n- **For local audio files** (voice isolation, dubbing, speech-to-speech), upload via `+rw-integrate-uploads` first.\n- **Voice IDs** can be listed via the voices endpoint — see `+rw-api-reference` for details.\n- **Text-to-speech cost** scales with text length: 1 credit per 50 characters.\n",{"data":39,"body":42},{"name":4,"description":6,"user-invocable":40,"allowed-tools":41},false,"Read, Grep, Glob, Edit, Write",{"type":43,"children":44},"root",[45,54,103,108,115,308,314,319,326,715,721,815,821,826,960,998,1004,1009,1257,1263,1268,1435,1441,1446,1686,1692,1698,2501,2507,2669,2675,2735],{"type":46,"tag":47,"props":48,"children":50},"element","h1",{"id":49},"integrate-audio-generation",[51],{"type":52,"value":53},"text","Integrate Audio Generation",{"type":46,"tag":55,"props":56,"children":57},"blockquote",{},[58],{"type":46,"tag":59,"props":60,"children":61},"p",{},[62,68,70,77,79,85,87,93,95,101],{"type":46,"tag":63,"props":64,"children":65},"strong",{},[66],{"type":52,"value":67},"PREREQUISITE:",{"type":52,"value":69}," Run ",{"type":46,"tag":71,"props":72,"children":74},"code",{"className":73},[],[75],{"type":52,"value":76},"+rw-check-compatibility",{"type":52,"value":78}," first. Run ",{"type":46,"tag":71,"props":80,"children":82},{"className":81},[],[83],{"type":52,"value":84},"+rw-fetch-api-reference",{"type":52,"value":86}," to load the latest API reference before integrating. Requires ",{"type":46,"tag":71,"props":88,"children":90},{"className":89},[],[91],{"type":52,"value":92},"+rw-setup-api-key",{"type":52,"value":94}," for API credentials. Requires ",{"type":46,"tag":71,"props":96,"children":98},{"className":97},[],[99],{"type":52,"value":100},"+rw-integrate-uploads",{"type":52,"value":102}," for local audio\u002Fvideo files.",{"type":46,"tag":59,"props":104,"children":105},{},[106],{"type":52,"value":107},"Help users add Runway audio generation to their server-side code.",{"type":46,"tag":109,"props":110,"children":112},"h2",{"id":111},"available-models",[113],{"type":52,"value":114},"Available Models",{"type":46,"tag":116,"props":117,"children":118},"table",{},[119,148],{"type":46,"tag":120,"props":121,"children":122},"thead",{},[123],{"type":46,"tag":124,"props":125,"children":126},"tr",{},[127,133,138,143],{"type":46,"tag":128,"props":129,"children":130},"th",{},[131],{"type":52,"value":132},"Model",{"type":46,"tag":128,"props":134,"children":135},{},[136],{"type":52,"value":137},"Endpoint",{"type":46,"tag":128,"props":139,"children":140},{},[141],{"type":52,"value":142},"Use Case",{"type":46,"tag":128,"props":144,"children":145},{},[146],{"type":52,"value":147},"Cost",{"type":46,"tag":149,"props":150,"children":151},"tbody",{},[152,184,215,246,277],{"type":46,"tag":124,"props":153,"children":154},{},[155,165,174,179],{"type":46,"tag":156,"props":157,"children":158},"td",{},[159],{"type":46,"tag":71,"props":160,"children":162},{"className":161},[],[163],{"type":52,"value":164},"eleven_multilingual_v2",{"type":46,"tag":156,"props":166,"children":167},{},[168],{"type":46,"tag":71,"props":169,"children":171},{"className":170},[],[172],{"type":52,"value":173},"POST \u002Fv1\u002Ftext_to_speech",{"type":46,"tag":156,"props":175,"children":176},{},[177],{"type":52,"value":178},"Text to speech",{"type":46,"tag":156,"props":180,"children":181},{},[182],{"type":52,"value":183},"1 credit\u002F50 chars",{"type":46,"tag":124,"props":185,"children":186},{},[187,196,205,210],{"type":46,"tag":156,"props":188,"children":189},{},[190],{"type":46,"tag":71,"props":191,"children":193},{"className":192},[],[194],{"type":52,"value":195},"eleven_text_to_sound_v2",{"type":46,"tag":156,"props":197,"children":198},{},[199],{"type":46,"tag":71,"props":200,"children":202},{"className":201},[],[203],{"type":52,"value":204},"POST \u002Fv1\u002Fsound_effect",{"type":46,"tag":156,"props":206,"children":207},{},[208],{"type":52,"value":209},"Sound effect generation",{"type":46,"tag":156,"props":211,"children":212},{},[213],{"type":52,"value":214},"1-2 credits",{"type":46,"tag":124,"props":216,"children":217},{},[218,227,236,241],{"type":46,"tag":156,"props":219,"children":220},{},[221],{"type":46,"tag":71,"props":222,"children":224},{"className":223},[],[225],{"type":52,"value":226},"eleven_voice_isolation",{"type":46,"tag":156,"props":228,"children":229},{},[230],{"type":46,"tag":71,"props":231,"children":233},{"className":232},[],[234],{"type":52,"value":235},"POST \u002Fv1\u002Fvoice_isolation",{"type":46,"tag":156,"props":237,"children":238},{},[239],{"type":52,"value":240},"Isolate voice from audio",{"type":46,"tag":156,"props":242,"children":243},{},[244],{"type":52,"value":245},"1 credit\u002F6 sec",{"type":46,"tag":124,"props":247,"children":248},{},[249,258,267,272],{"type":46,"tag":156,"props":250,"children":251},{},[252],{"type":46,"tag":71,"props":253,"children":255},{"className":254},[],[256],{"type":52,"value":257},"eleven_voice_dubbing",{"type":46,"tag":156,"props":259,"children":260},{},[261],{"type":46,"tag":71,"props":262,"children":264},{"className":263},[],[265],{"type":52,"value":266},"POST \u002Fv1\u002Fvoice_dubbing",{"type":46,"tag":156,"props":268,"children":269},{},[270],{"type":52,"value":271},"Dub audio to other languages",{"type":46,"tag":156,"props":273,"children":274},{},[275],{"type":52,"value":276},"1 credit\u002F2 sec",{"type":46,"tag":124,"props":278,"children":279},{},[280,289,298,303],{"type":46,"tag":156,"props":281,"children":282},{},[283],{"type":46,"tag":71,"props":284,"children":286},{"className":285},[],[287],{"type":52,"value":288},"eleven_multilingual_sts_v2",{"type":46,"tag":156,"props":290,"children":291},{},[292],{"type":46,"tag":71,"props":293,"children":295},{"className":294},[],[296],{"type":52,"value":297},"POST \u002Fv1\u002Fspeech_to_speech",{"type":46,"tag":156,"props":299,"children":300},{},[301],{"type":52,"value":302},"Voice conversion",{"type":46,"tag":156,"props":304,"children":305},{},[306],{"type":52,"value":307},"1 credit\u002F3 sec",{"type":46,"tag":109,"props":309,"children":311},{"id":310},"text-to-speech",[312],{"type":52,"value":313},"Text-to-Speech",{"type":46,"tag":59,"props":315,"children":316},{},[317],{"type":52,"value":318},"Generate speech from text using the ElevenLabs multilingual model.",{"type":46,"tag":320,"props":321,"children":323},"h3",{"id":322},"nodejs-sdk",[324],{"type":52,"value":325},"Node.js SDK",{"type":46,"tag":327,"props":328,"children":333},"pre",{"className":329,"code":330,"language":331,"meta":332,"style":332},"language-javascript shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import RunwayML from '@runwayml\u002Fsdk';\n\nconst client = new RunwayML();\n\nconst task = await client.textToSpeech.create({\n  model: 'eleven_multilingual_v2',\n  promptText: 'Hello, welcome to our application!',\n  voice: { type: 'runway-preset', presetId: 'Maya' }\n}).waitForTaskOutput();\n\nconst audioUrl = task.output[0];\n","javascript","",[334],{"type":46,"tag":71,"props":335,"children":336},{"__ignoreMap":332},[337,382,392,432,440,496,528,558,630,661,669],{"type":46,"tag":338,"props":339,"children":342},"span",{"class":340,"line":341},"line",1,[343,349,355,360,366,372,377],{"type":46,"tag":338,"props":344,"children":346},{"style":345},"--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic",[347],{"type":52,"value":348},"import",{"type":46,"tag":338,"props":350,"children":352},{"style":351},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[353],{"type":52,"value":354}," RunwayML ",{"type":46,"tag":338,"props":356,"children":357},{"style":345},[358],{"type":52,"value":359},"from",{"type":46,"tag":338,"props":361,"children":363},{"style":362},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[364],{"type":52,"value":365}," '",{"type":46,"tag":338,"props":367,"children":369},{"style":368},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[370],{"type":52,"value":371},"@runwayml\u002Fsdk",{"type":46,"tag":338,"props":373,"children":374},{"style":362},[375],{"type":52,"value":376},"'",{"type":46,"tag":338,"props":378,"children":379},{"style":362},[380],{"type":52,"value":381},";\n",{"type":46,"tag":338,"props":383,"children":385},{"class":340,"line":384},2,[386],{"type":46,"tag":338,"props":387,"children":389},{"emptyLinePlaceholder":388},true,[390],{"type":52,"value":391},"\n",{"type":46,"tag":338,"props":393,"children":395},{"class":340,"line":394},3,[396,402,407,412,417,423,428],{"type":46,"tag":338,"props":397,"children":399},{"style":398},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[400],{"type":52,"value":401},"const",{"type":46,"tag":338,"props":403,"children":404},{"style":351},[405],{"type":52,"value":406}," client ",{"type":46,"tag":338,"props":408,"children":409},{"style":362},[410],{"type":52,"value":411},"=",{"type":46,"tag":338,"props":413,"children":414},{"style":362},[415],{"type":52,"value":416}," new",{"type":46,"tag":338,"props":418,"children":420},{"style":419},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[421],{"type":52,"value":422}," RunwayML",{"type":46,"tag":338,"props":424,"children":425},{"style":351},[426],{"type":52,"value":427},"()",{"type":46,"tag":338,"props":429,"children":430},{"style":362},[431],{"type":52,"value":381},{"type":46,"tag":338,"props":433,"children":435},{"class":340,"line":434},4,[436],{"type":46,"tag":338,"props":437,"children":438},{"emptyLinePlaceholder":388},[439],{"type":52,"value":391},{"type":46,"tag":338,"props":441,"children":443},{"class":340,"line":442},5,[444,448,453,457,462,467,472,477,481,486,491],{"type":46,"tag":338,"props":445,"children":446},{"style":398},[447],{"type":52,"value":401},{"type":46,"tag":338,"props":449,"children":450},{"style":351},[451],{"type":52,"value":452}," task ",{"type":46,"tag":338,"props":454,"children":455},{"style":362},[456],{"type":52,"value":411},{"type":46,"tag":338,"props":458,"children":459},{"style":345},[460],{"type":52,"value":461}," await",{"type":46,"tag":338,"props":463,"children":464},{"style":351},[465],{"type":52,"value":466}," client",{"type":46,"tag":338,"props":468,"children":469},{"style":362},[470],{"type":52,"value":471},".",{"type":46,"tag":338,"props":473,"children":474},{"style":351},[475],{"type":52,"value":476},"textToSpeech",{"type":46,"tag":338,"props":478,"children":479},{"style":362},[480],{"type":52,"value":471},{"type":46,"tag":338,"props":482,"children":483},{"style":419},[484],{"type":52,"value":485},"create",{"type":46,"tag":338,"props":487,"children":488},{"style":351},[489],{"type":52,"value":490},"(",{"type":46,"tag":338,"props":492,"children":493},{"style":362},[494],{"type":52,"value":495},"{\n",{"type":46,"tag":338,"props":497,"children":499},{"class":340,"line":498},6,[500,506,511,515,519,523],{"type":46,"tag":338,"props":501,"children":503},{"style":502},"--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178",[504],{"type":52,"value":505},"  model",{"type":46,"tag":338,"props":507,"children":508},{"style":362},[509],{"type":52,"value":510},":",{"type":46,"tag":338,"props":512,"children":513},{"style":362},[514],{"type":52,"value":365},{"type":46,"tag":338,"props":516,"children":517},{"style":368},[518],{"type":52,"value":164},{"type":46,"tag":338,"props":520,"children":521},{"style":362},[522],{"type":52,"value":376},{"type":46,"tag":338,"props":524,"children":525},{"style":362},[526],{"type":52,"value":527},",\n",{"type":46,"tag":338,"props":529,"children":531},{"class":340,"line":530},7,[532,537,541,545,550,554],{"type":46,"tag":338,"props":533,"children":534},{"style":502},[535],{"type":52,"value":536},"  promptText",{"type":46,"tag":338,"props":538,"children":539},{"style":362},[540],{"type":52,"value":510},{"type":46,"tag":338,"props":542,"children":543},{"style":362},[544],{"type":52,"value":365},{"type":46,"tag":338,"props":546,"children":547},{"style":368},[548],{"type":52,"value":549},"Hello, welcome to our application!",{"type":46,"tag":338,"props":551,"children":552},{"style":362},[553],{"type":52,"value":376},{"type":46,"tag":338,"props":555,"children":556},{"style":362},[557],{"type":52,"value":527},{"type":46,"tag":338,"props":559,"children":561},{"class":340,"line":560},8,[562,567,571,576,581,585,589,594,598,603,608,612,616,621,625],{"type":46,"tag":338,"props":563,"children":564},{"style":502},[565],{"type":52,"value":566},"  voice",{"type":46,"tag":338,"props":568,"children":569},{"style":362},[570],{"type":52,"value":510},{"type":46,"tag":338,"props":572,"children":573},{"style":362},[574],{"type":52,"value":575}," {",{"type":46,"tag":338,"props":577,"children":578},{"style":502},[579],{"type":52,"value":580}," type",{"type":46,"tag":338,"props":582,"children":583},{"style":362},[584],{"type":52,"value":510},{"type":46,"tag":338,"props":586,"children":587},{"style":362},[588],{"type":52,"value":365},{"type":46,"tag":338,"props":590,"children":591},{"style":368},[592],{"type":52,"value":593},"runway-preset",{"type":46,"tag":338,"props":595,"children":596},{"style":362},[597],{"type":52,"value":376},{"type":46,"tag":338,"props":599,"children":600},{"style":362},[601],{"type":52,"value":602},",",{"type":46,"tag":338,"props":604,"children":605},{"style":502},[606],{"type":52,"value":607}," presetId",{"type":46,"tag":338,"props":609,"children":610},{"style":362},[611],{"type":52,"value":510},{"type":46,"tag":338,"props":613,"children":614},{"style":362},[615],{"type":52,"value":365},{"type":46,"tag":338,"props":617,"children":618},{"style":368},[619],{"type":52,"value":620},"Maya",{"type":46,"tag":338,"props":622,"children":623},{"style":362},[624],{"type":52,"value":376},{"type":46,"tag":338,"props":626,"children":627},{"style":362},[628],{"type":52,"value":629}," }\n",{"type":46,"tag":338,"props":631,"children":633},{"class":340,"line":632},9,[634,639,644,648,653,657],{"type":46,"tag":338,"props":635,"children":636},{"style":362},[637],{"type":52,"value":638},"}",{"type":46,"tag":338,"props":640,"children":641},{"style":351},[642],{"type":52,"value":643},")",{"type":46,"tag":338,"props":645,"children":646},{"style":362},[647],{"type":52,"value":471},{"type":46,"tag":338,"props":649,"children":650},{"style":419},[651],{"type":52,"value":652},"waitForTaskOutput",{"type":46,"tag":338,"props":654,"children":655},{"style":351},[656],{"type":52,"value":427},{"type":46,"tag":338,"props":658,"children":659},{"style":362},[660],{"type":52,"value":381},{"type":46,"tag":338,"props":662,"children":664},{"class":340,"line":663},10,[665],{"type":46,"tag":338,"props":666,"children":667},{"emptyLinePlaceholder":388},[668],{"type":52,"value":391},{"type":46,"tag":338,"props":670,"children":672},{"class":340,"line":671},11,[673,677,682,686,691,695,700,706,711],{"type":46,"tag":338,"props":674,"children":675},{"style":398},[676],{"type":52,"value":401},{"type":46,"tag":338,"props":678,"children":679},{"style":351},[680],{"type":52,"value":681}," audioUrl ",{"type":46,"tag":338,"props":683,"children":684},{"style":362},[685],{"type":52,"value":411},{"type":46,"tag":338,"props":687,"children":688},{"style":351},[689],{"type":52,"value":690}," task",{"type":46,"tag":338,"props":692,"children":693},{"style":362},[694],{"type":52,"value":471},{"type":46,"tag":338,"props":696,"children":697},{"style":351},[698],{"type":52,"value":699},"output[",{"type":46,"tag":338,"props":701,"children":703},{"style":702},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[704],{"type":52,"value":705},"0",{"type":46,"tag":338,"props":707,"children":708},{"style":351},[709],{"type":52,"value":710},"]",{"type":46,"tag":338,"props":712,"children":713},{"style":362},[714],{"type":52,"value":381},{"type":46,"tag":320,"props":716,"children":718},{"id":717},"python-sdk",[719],{"type":52,"value":720},"Python SDK",{"type":46,"tag":327,"props":722,"children":726},{"className":723,"code":724,"language":725,"meta":332,"style":332},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from runwayml import RunwayML\n\nclient = RunwayML()\n\ntask = client.text_to_speech.create(\n    model='eleven_multilingual_v2',\n    prompt_text='Hello, welcome to our application!',\n    voice={ 'type': 'runway-preset', 'presetId': 'Maya' }\n).wait_for_task_output()\n\naudio_url = task.output[0]\n","python",[727],{"type":46,"tag":71,"props":728,"children":729},{"__ignoreMap":332},[730,738,745,753,760,768,776,784,792,800,807],{"type":46,"tag":338,"props":731,"children":732},{"class":340,"line":341},[733],{"type":46,"tag":338,"props":734,"children":735},{},[736],{"type":52,"value":737},"from runwayml import RunwayML\n",{"type":46,"tag":338,"props":739,"children":740},{"class":340,"line":384},[741],{"type":46,"tag":338,"props":742,"children":743},{"emptyLinePlaceholder":388},[744],{"type":52,"value":391},{"type":46,"tag":338,"props":746,"children":747},{"class":340,"line":394},[748],{"type":46,"tag":338,"props":749,"children":750},{},[751],{"type":52,"value":752},"client = RunwayML()\n",{"type":46,"tag":338,"props":754,"children":755},{"class":340,"line":434},[756],{"type":46,"tag":338,"props":757,"children":758},{"emptyLinePlaceholder":388},[759],{"type":52,"value":391},{"type":46,"tag":338,"props":761,"children":762},{"class":340,"line":442},[763],{"type":46,"tag":338,"props":764,"children":765},{},[766],{"type":52,"value":767},"task = client.text_to_speech.create(\n",{"type":46,"tag":338,"props":769,"children":770},{"class":340,"line":498},[771],{"type":46,"tag":338,"props":772,"children":773},{},[774],{"type":52,"value":775},"    model='eleven_multilingual_v2',\n",{"type":46,"tag":338,"props":777,"children":778},{"class":340,"line":530},[779],{"type":46,"tag":338,"props":780,"children":781},{},[782],{"type":52,"value":783},"    prompt_text='Hello, welcome to our application!',\n",{"type":46,"tag":338,"props":785,"children":786},{"class":340,"line":560},[787],{"type":46,"tag":338,"props":788,"children":789},{},[790],{"type":52,"value":791},"    voice={ 'type': 'runway-preset', 'presetId': 'Maya' }\n",{"type":46,"tag":338,"props":793,"children":794},{"class":340,"line":632},[795],{"type":46,"tag":338,"props":796,"children":797},{},[798],{"type":52,"value":799},").wait_for_task_output()\n",{"type":46,"tag":338,"props":801,"children":802},{"class":340,"line":663},[803],{"type":46,"tag":338,"props":804,"children":805},{"emptyLinePlaceholder":388},[806],{"type":52,"value":391},{"type":46,"tag":338,"props":808,"children":809},{"class":340,"line":671},[810],{"type":46,"tag":338,"props":811,"children":812},{},[813],{"type":52,"value":814},"audio_url = task.output[0]\n",{"type":46,"tag":109,"props":816,"children":818},{"id":817},"sound-effects",[819],{"type":52,"value":820},"Sound Effects",{"type":46,"tag":59,"props":822,"children":823},{},[824],{"type":52,"value":825},"Generate sound effects from text descriptions.",{"type":46,"tag":327,"props":827,"children":829},{"className":329,"code":828,"language":331,"meta":332,"style":332},"const task = await client.soundEffect.create({\n  model: 'eleven_text_to_sound_v2',\n  promptText: 'Thunder rolling across a stormy sky'\n}).waitForTaskOutput();\n",[830],{"type":46,"tag":71,"props":831,"children":832},{"__ignoreMap":332},[833,881,908,933],{"type":46,"tag":338,"props":834,"children":835},{"class":340,"line":341},[836,840,844,848,852,856,860,865,869,873,877],{"type":46,"tag":338,"props":837,"children":838},{"style":398},[839],{"type":52,"value":401},{"type":46,"tag":338,"props":841,"children":842},{"style":351},[843],{"type":52,"value":452},{"type":46,"tag":338,"props":845,"children":846},{"style":362},[847],{"type":52,"value":411},{"type":46,"tag":338,"props":849,"children":850},{"style":345},[851],{"type":52,"value":461},{"type":46,"tag":338,"props":853,"children":854},{"style":351},[855],{"type":52,"value":466},{"type":46,"tag":338,"props":857,"children":858},{"style":362},[859],{"type":52,"value":471},{"type":46,"tag":338,"props":861,"children":862},{"style":351},[863],{"type":52,"value":864},"soundEffect",{"type":46,"tag":338,"props":866,"children":867},{"style":362},[868],{"type":52,"value":471},{"type":46,"tag":338,"props":870,"children":871},{"style":419},[872],{"type":52,"value":485},{"type":46,"tag":338,"props":874,"children":875},{"style":351},[876],{"type":52,"value":490},{"type":46,"tag":338,"props":878,"children":879},{"style":362},[880],{"type":52,"value":495},{"type":46,"tag":338,"props":882,"children":883},{"class":340,"line":384},[884,888,892,896,900,904],{"type":46,"tag":338,"props":885,"children":886},{"style":502},[887],{"type":52,"value":505},{"type":46,"tag":338,"props":889,"children":890},{"style":362},[891],{"type":52,"value":510},{"type":46,"tag":338,"props":893,"children":894},{"style":362},[895],{"type":52,"value":365},{"type":46,"tag":338,"props":897,"children":898},{"style":368},[899],{"type":52,"value":195},{"type":46,"tag":338,"props":901,"children":902},{"style":362},[903],{"type":52,"value":376},{"type":46,"tag":338,"props":905,"children":906},{"style":362},[907],{"type":52,"value":527},{"type":46,"tag":338,"props":909,"children":910},{"class":340,"line":394},[911,915,919,923,928],{"type":46,"tag":338,"props":912,"children":913},{"style":502},[914],{"type":52,"value":536},{"type":46,"tag":338,"props":916,"children":917},{"style":362},[918],{"type":52,"value":510},{"type":46,"tag":338,"props":920,"children":921},{"style":362},[922],{"type":52,"value":365},{"type":46,"tag":338,"props":924,"children":925},{"style":368},[926],{"type":52,"value":927},"Thunder rolling across a stormy sky",{"type":46,"tag":338,"props":929,"children":930},{"style":362},[931],{"type":52,"value":932},"'\n",{"type":46,"tag":338,"props":934,"children":935},{"class":340,"line":434},[936,940,944,948,952,956],{"type":46,"tag":338,"props":937,"children":938},{"style":362},[939],{"type":52,"value":638},{"type":46,"tag":338,"props":941,"children":942},{"style":351},[943],{"type":52,"value":643},{"type":46,"tag":338,"props":945,"children":946},{"style":362},[947],{"type":52,"value":471},{"type":46,"tag":338,"props":949,"children":950},{"style":419},[951],{"type":52,"value":652},{"type":46,"tag":338,"props":953,"children":954},{"style":351},[955],{"type":52,"value":427},{"type":46,"tag":338,"props":957,"children":958},{"style":362},[959],{"type":52,"value":381},{"type":46,"tag":327,"props":961,"children":963},{"className":723,"code":962,"language":725,"meta":332,"style":332},"task = client.sound_effect.create(\n    model='eleven_text_to_sound_v2',\n    prompt_text='Thunder rolling across a stormy sky'\n).wait_for_task_output()\n",[964],{"type":46,"tag":71,"props":965,"children":966},{"__ignoreMap":332},[967,975,983,991],{"type":46,"tag":338,"props":968,"children":969},{"class":340,"line":341},[970],{"type":46,"tag":338,"props":971,"children":972},{},[973],{"type":52,"value":974},"task = client.sound_effect.create(\n",{"type":46,"tag":338,"props":976,"children":977},{"class":340,"line":384},[978],{"type":46,"tag":338,"props":979,"children":980},{},[981],{"type":52,"value":982},"    model='eleven_text_to_sound_v2',\n",{"type":46,"tag":338,"props":984,"children":985},{"class":340,"line":394},[986],{"type":46,"tag":338,"props":987,"children":988},{},[989],{"type":52,"value":990},"    prompt_text='Thunder rolling across a stormy sky'\n",{"type":46,"tag":338,"props":992,"children":993},{"class":340,"line":434},[994],{"type":46,"tag":338,"props":995,"children":996},{},[997],{"type":52,"value":799},{"type":46,"tag":109,"props":999,"children":1001},{"id":1000},"voice-isolation",[1002],{"type":52,"value":1003},"Voice Isolation",{"type":46,"tag":59,"props":1005,"children":1006},{},[1007],{"type":52,"value":1008},"Extract voice from audio with background noise.",{"type":46,"tag":327,"props":1010,"children":1012},{"className":329,"code":1011,"language":331,"meta":332,"style":332},"\u002F\u002F If using a local file, upload first\nconst upload = await client.uploads.createEphemeral(\n  fs.createReadStream('\u002Fpath\u002Fto\u002Fnoisy-audio.mp3')\n);\n\nconst task = await client.voiceIsolation.create({\n  model: 'eleven_voice_isolation',\n  audioUri: upload.runwayUri\n}).waitForTaskOutput();\n",[1013],{"type":46,"tag":71,"props":1014,"children":1015},{"__ignoreMap":332},[1016,1025,1072,1111,1122,1129,1177,1204,1230],{"type":46,"tag":338,"props":1017,"children":1018},{"class":340,"line":341},[1019],{"type":46,"tag":338,"props":1020,"children":1022},{"style":1021},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[1023],{"type":52,"value":1024},"\u002F\u002F If using a local file, upload first\n",{"type":46,"tag":338,"props":1026,"children":1027},{"class":340,"line":384},[1028,1032,1037,1041,1045,1049,1053,1058,1062,1067],{"type":46,"tag":338,"props":1029,"children":1030},{"style":398},[1031],{"type":52,"value":401},{"type":46,"tag":338,"props":1033,"children":1034},{"style":351},[1035],{"type":52,"value":1036}," upload ",{"type":46,"tag":338,"props":1038,"children":1039},{"style":362},[1040],{"type":52,"value":411},{"type":46,"tag":338,"props":1042,"children":1043},{"style":345},[1044],{"type":52,"value":461},{"type":46,"tag":338,"props":1046,"children":1047},{"style":351},[1048],{"type":52,"value":466},{"type":46,"tag":338,"props":1050,"children":1051},{"style":362},[1052],{"type":52,"value":471},{"type":46,"tag":338,"props":1054,"children":1055},{"style":351},[1056],{"type":52,"value":1057},"uploads",{"type":46,"tag":338,"props":1059,"children":1060},{"style":362},[1061],{"type":52,"value":471},{"type":46,"tag":338,"props":1063,"children":1064},{"style":419},[1065],{"type":52,"value":1066},"createEphemeral",{"type":46,"tag":338,"props":1068,"children":1069},{"style":351},[1070],{"type":52,"value":1071},"(\n",{"type":46,"tag":338,"props":1073,"children":1074},{"class":340,"line":394},[1075,1080,1084,1089,1093,1097,1102,1106],{"type":46,"tag":338,"props":1076,"children":1077},{"style":351},[1078],{"type":52,"value":1079},"  fs",{"type":46,"tag":338,"props":1081,"children":1082},{"style":362},[1083],{"type":52,"value":471},{"type":46,"tag":338,"props":1085,"children":1086},{"style":419},[1087],{"type":52,"value":1088},"createReadStream",{"type":46,"tag":338,"props":1090,"children":1091},{"style":351},[1092],{"type":52,"value":490},{"type":46,"tag":338,"props":1094,"children":1095},{"style":362},[1096],{"type":52,"value":376},{"type":46,"tag":338,"props":1098,"children":1099},{"style":368},[1100],{"type":52,"value":1101},"\u002Fpath\u002Fto\u002Fnoisy-audio.mp3",{"type":46,"tag":338,"props":1103,"children":1104},{"style":362},[1105],{"type":52,"value":376},{"type":46,"tag":338,"props":1107,"children":1108},{"style":351},[1109],{"type":52,"value":1110},")\n",{"type":46,"tag":338,"props":1112,"children":1113},{"class":340,"line":434},[1114,1118],{"type":46,"tag":338,"props":1115,"children":1116},{"style":351},[1117],{"type":52,"value":643},{"type":46,"tag":338,"props":1119,"children":1120},{"style":362},[1121],{"type":52,"value":381},{"type":46,"tag":338,"props":1123,"children":1124},{"class":340,"line":442},[1125],{"type":46,"tag":338,"props":1126,"children":1127},{"emptyLinePlaceholder":388},[1128],{"type":52,"value":391},{"type":46,"tag":338,"props":1130,"children":1131},{"class":340,"line":498},[1132,1136,1140,1144,1148,1152,1156,1161,1165,1169,1173],{"type":46,"tag":338,"props":1133,"children":1134},{"style":398},[1135],{"type":52,"value":401},{"type":46,"tag":338,"props":1137,"children":1138},{"style":351},[1139],{"type":52,"value":452},{"type":46,"tag":338,"props":1141,"children":1142},{"style":362},[1143],{"type":52,"value":411},{"type":46,"tag":338,"props":1145,"children":1146},{"style":345},[1147],{"type":52,"value":461},{"type":46,"tag":338,"props":1149,"children":1150},{"style":351},[1151],{"type":52,"value":466},{"type":46,"tag":338,"props":1153,"children":1154},{"style":362},[1155],{"type":52,"value":471},{"type":46,"tag":338,"props":1157,"children":1158},{"style":351},[1159],{"type":52,"value":1160},"voiceIsolation",{"type":46,"tag":338,"props":1162,"children":1163},{"style":362},[1164],{"type":52,"value":471},{"type":46,"tag":338,"props":1166,"children":1167},{"style":419},[1168],{"type":52,"value":485},{"type":46,"tag":338,"props":1170,"children":1171},{"style":351},[1172],{"type":52,"value":490},{"type":46,"tag":338,"props":1174,"children":1175},{"style":362},[1176],{"type":52,"value":495},{"type":46,"tag":338,"props":1178,"children":1179},{"class":340,"line":530},[1180,1184,1188,1192,1196,1200],{"type":46,"tag":338,"props":1181,"children":1182},{"style":502},[1183],{"type":52,"value":505},{"type":46,"tag":338,"props":1185,"children":1186},{"style":362},[1187],{"type":52,"value":510},{"type":46,"tag":338,"props":1189,"children":1190},{"style":362},[1191],{"type":52,"value":365},{"type":46,"tag":338,"props":1193,"children":1194},{"style":368},[1195],{"type":52,"value":226},{"type":46,"tag":338,"props":1197,"children":1198},{"style":362},[1199],{"type":52,"value":376},{"type":46,"tag":338,"props":1201,"children":1202},{"style":362},[1203],{"type":52,"value":527},{"type":46,"tag":338,"props":1205,"children":1206},{"class":340,"line":560},[1207,1212,1216,1221,1225],{"type":46,"tag":338,"props":1208,"children":1209},{"style":502},[1210],{"type":52,"value":1211},"  audioUri",{"type":46,"tag":338,"props":1213,"children":1214},{"style":362},[1215],{"type":52,"value":510},{"type":46,"tag":338,"props":1217,"children":1218},{"style":351},[1219],{"type":52,"value":1220}," upload",{"type":46,"tag":338,"props":1222,"children":1223},{"style":362},[1224],{"type":52,"value":471},{"type":46,"tag":338,"props":1226,"children":1227},{"style":351},[1228],{"type":52,"value":1229},"runwayUri\n",{"type":46,"tag":338,"props":1231,"children":1232},{"class":340,"line":632},[1233,1237,1241,1245,1249,1253],{"type":46,"tag":338,"props":1234,"children":1235},{"style":362},[1236],{"type":52,"value":638},{"type":46,"tag":338,"props":1238,"children":1239},{"style":351},[1240],{"type":52,"value":643},{"type":46,"tag":338,"props":1242,"children":1243},{"style":362},[1244],{"type":52,"value":471},{"type":46,"tag":338,"props":1246,"children":1247},{"style":419},[1248],{"type":52,"value":652},{"type":46,"tag":338,"props":1250,"children":1251},{"style":351},[1252],{"type":52,"value":427},{"type":46,"tag":338,"props":1254,"children":1255},{"style":362},[1256],{"type":52,"value":381},{"type":46,"tag":109,"props":1258,"children":1260},{"id":1259},"voice-dubbing",[1261],{"type":52,"value":1262},"Voice Dubbing",{"type":46,"tag":59,"props":1264,"children":1265},{},[1266],{"type":52,"value":1267},"Dub audio\u002Fvideo into other languages.",{"type":46,"tag":327,"props":1269,"children":1271},{"className":329,"code":1270,"language":331,"meta":332,"style":332},"const task = await client.voiceDubbing.create({\n  model: 'eleven_voice_dubbing',\n  audioUri: 'https:\u002F\u002Fexample.com\u002Fspeech.mp3',\n  targetLang: 'es'  \u002F\u002F Spanish\n}).waitForTaskOutput();\n",[1272],{"type":46,"tag":71,"props":1273,"children":1274},{"__ignoreMap":332},[1275,1323,1350,1378,1408],{"type":46,"tag":338,"props":1276,"children":1277},{"class":340,"line":341},[1278,1282,1286,1290,1294,1298,1302,1307,1311,1315,1319],{"type":46,"tag":338,"props":1279,"children":1280},{"style":398},[1281],{"type":52,"value":401},{"type":46,"tag":338,"props":1283,"children":1284},{"style":351},[1285],{"type":52,"value":452},{"type":46,"tag":338,"props":1287,"children":1288},{"style":362},[1289],{"type":52,"value":411},{"type":46,"tag":338,"props":1291,"children":1292},{"style":345},[1293],{"type":52,"value":461},{"type":46,"tag":338,"props":1295,"children":1296},{"style":351},[1297],{"type":52,"value":466},{"type":46,"tag":338,"props":1299,"children":1300},{"style":362},[1301],{"type":52,"value":471},{"type":46,"tag":338,"props":1303,"children":1304},{"style":351},[1305],{"type":52,"value":1306},"voiceDubbing",{"type":46,"tag":338,"props":1308,"children":1309},{"style":362},[1310],{"type":52,"value":471},{"type":46,"tag":338,"props":1312,"children":1313},{"style":419},[1314],{"type":52,"value":485},{"type":46,"tag":338,"props":1316,"children":1317},{"style":351},[1318],{"type":52,"value":490},{"type":46,"tag":338,"props":1320,"children":1321},{"style":362},[1322],{"type":52,"value":495},{"type":46,"tag":338,"props":1324,"children":1325},{"class":340,"line":384},[1326,1330,1334,1338,1342,1346],{"type":46,"tag":338,"props":1327,"children":1328},{"style":502},[1329],{"type":52,"value":505},{"type":46,"tag":338,"props":1331,"children":1332},{"style":362},[1333],{"type":52,"value":510},{"type":46,"tag":338,"props":1335,"children":1336},{"style":362},[1337],{"type":52,"value":365},{"type":46,"tag":338,"props":1339,"children":1340},{"style":368},[1341],{"type":52,"value":257},{"type":46,"tag":338,"props":1343,"children":1344},{"style":362},[1345],{"type":52,"value":376},{"type":46,"tag":338,"props":1347,"children":1348},{"style":362},[1349],{"type":52,"value":527},{"type":46,"tag":338,"props":1351,"children":1352},{"class":340,"line":394},[1353,1357,1361,1365,1370,1374],{"type":46,"tag":338,"props":1354,"children":1355},{"style":502},[1356],{"type":52,"value":1211},{"type":46,"tag":338,"props":1358,"children":1359},{"style":362},[1360],{"type":52,"value":510},{"type":46,"tag":338,"props":1362,"children":1363},{"style":362},[1364],{"type":52,"value":365},{"type":46,"tag":338,"props":1366,"children":1367},{"style":368},[1368],{"type":52,"value":1369},"https:\u002F\u002Fexample.com\u002Fspeech.mp3",{"type":46,"tag":338,"props":1371,"children":1372},{"style":362},[1373],{"type":52,"value":376},{"type":46,"tag":338,"props":1375,"children":1376},{"style":362},[1377],{"type":52,"value":527},{"type":46,"tag":338,"props":1379,"children":1380},{"class":340,"line":434},[1381,1386,1390,1394,1399,1403],{"type":46,"tag":338,"props":1382,"children":1383},{"style":502},[1384],{"type":52,"value":1385},"  targetLang",{"type":46,"tag":338,"props":1387,"children":1388},{"style":362},[1389],{"type":52,"value":510},{"type":46,"tag":338,"props":1391,"children":1392},{"style":362},[1393],{"type":52,"value":365},{"type":46,"tag":338,"props":1395,"children":1396},{"style":368},[1397],{"type":52,"value":1398},"es",{"type":46,"tag":338,"props":1400,"children":1401},{"style":362},[1402],{"type":52,"value":376},{"type":46,"tag":338,"props":1404,"children":1405},{"style":1021},[1406],{"type":52,"value":1407},"  \u002F\u002F Spanish\n",{"type":46,"tag":338,"props":1409,"children":1410},{"class":340,"line":442},[1411,1415,1419,1423,1427,1431],{"type":46,"tag":338,"props":1412,"children":1413},{"style":362},[1414],{"type":52,"value":638},{"type":46,"tag":338,"props":1416,"children":1417},{"style":351},[1418],{"type":52,"value":643},{"type":46,"tag":338,"props":1420,"children":1421},{"style":362},[1422],{"type":52,"value":471},{"type":46,"tag":338,"props":1424,"children":1425},{"style":419},[1426],{"type":52,"value":652},{"type":46,"tag":338,"props":1428,"children":1429},{"style":351},[1430],{"type":52,"value":427},{"type":46,"tag":338,"props":1432,"children":1433},{"style":362},[1434],{"type":52,"value":381},{"type":46,"tag":109,"props":1436,"children":1438},{"id":1437},"speech-to-speech",[1439],{"type":52,"value":1440},"Speech-to-Speech",{"type":46,"tag":59,"props":1442,"children":1443},{},[1444],{"type":52,"value":1445},"Convert one voice to another.",{"type":46,"tag":327,"props":1447,"children":1449},{"className":329,"code":1448,"language":331,"meta":332,"style":332},"const task = await client.speechToSpeech.create({\n  model: 'eleven_multilingual_sts_v2',\n  media: { type: 'audio', uri: 'https:\u002F\u002Fexample.com\u002Foriginal-speech.mp3' },\n  voice: { type: 'runway-preset', presetId: 'Noah' }\n}).waitForTaskOutput();\n",[1450],{"type":46,"tag":71,"props":1451,"children":1452},{"__ignoreMap":332},[1453,1501,1528,1595,1659],{"type":46,"tag":338,"props":1454,"children":1455},{"class":340,"line":341},[1456,1460,1464,1468,1472,1476,1480,1485,1489,1493,1497],{"type":46,"tag":338,"props":1457,"children":1458},{"style":398},[1459],{"type":52,"value":401},{"type":46,"tag":338,"props":1461,"children":1462},{"style":351},[1463],{"type":52,"value":452},{"type":46,"tag":338,"props":1465,"children":1466},{"style":362},[1467],{"type":52,"value":411},{"type":46,"tag":338,"props":1469,"children":1470},{"style":345},[1471],{"type":52,"value":461},{"type":46,"tag":338,"props":1473,"children":1474},{"style":351},[1475],{"type":52,"value":466},{"type":46,"tag":338,"props":1477,"children":1478},{"style":362},[1479],{"type":52,"value":471},{"type":46,"tag":338,"props":1481,"children":1482},{"style":351},[1483],{"type":52,"value":1484},"speechToSpeech",{"type":46,"tag":338,"props":1486,"children":1487},{"style":362},[1488],{"type":52,"value":471},{"type":46,"tag":338,"props":1490,"children":1491},{"style":419},[1492],{"type":52,"value":485},{"type":46,"tag":338,"props":1494,"children":1495},{"style":351},[1496],{"type":52,"value":490},{"type":46,"tag":338,"props":1498,"children":1499},{"style":362},[1500],{"type":52,"value":495},{"type":46,"tag":338,"props":1502,"children":1503},{"class":340,"line":384},[1504,1508,1512,1516,1520,1524],{"type":46,"tag":338,"props":1505,"children":1506},{"style":502},[1507],{"type":52,"value":505},{"type":46,"tag":338,"props":1509,"children":1510},{"style":362},[1511],{"type":52,"value":510},{"type":46,"tag":338,"props":1513,"children":1514},{"style":362},[1515],{"type":52,"value":365},{"type":46,"tag":338,"props":1517,"children":1518},{"style":368},[1519],{"type":52,"value":288},{"type":46,"tag":338,"props":1521,"children":1522},{"style":362},[1523],{"type":52,"value":376},{"type":46,"tag":338,"props":1525,"children":1526},{"style":362},[1527],{"type":52,"value":527},{"type":46,"tag":338,"props":1529,"children":1530},{"class":340,"line":394},[1531,1536,1540,1544,1548,1552,1556,1560,1564,1568,1573,1577,1581,1586,1590],{"type":46,"tag":338,"props":1532,"children":1533},{"style":502},[1534],{"type":52,"value":1535},"  media",{"type":46,"tag":338,"props":1537,"children":1538},{"style":362},[1539],{"type":52,"value":510},{"type":46,"tag":338,"props":1541,"children":1542},{"style":362},[1543],{"type":52,"value":575},{"type":46,"tag":338,"props":1545,"children":1546},{"style":502},[1547],{"type":52,"value":580},{"type":46,"tag":338,"props":1549,"children":1550},{"style":362},[1551],{"type":52,"value":510},{"type":46,"tag":338,"props":1553,"children":1554},{"style":362},[1555],{"type":52,"value":365},{"type":46,"tag":338,"props":1557,"children":1558},{"style":368},[1559],{"type":52,"value":20},{"type":46,"tag":338,"props":1561,"children":1562},{"style":362},[1563],{"type":52,"value":376},{"type":46,"tag":338,"props":1565,"children":1566},{"style":362},[1567],{"type":52,"value":602},{"type":46,"tag":338,"props":1569,"children":1570},{"style":502},[1571],{"type":52,"value":1572}," uri",{"type":46,"tag":338,"props":1574,"children":1575},{"style":362},[1576],{"type":52,"value":510},{"type":46,"tag":338,"props":1578,"children":1579},{"style":362},[1580],{"type":52,"value":365},{"type":46,"tag":338,"props":1582,"children":1583},{"style":368},[1584],{"type":52,"value":1585},"https:\u002F\u002Fexample.com\u002Foriginal-speech.mp3",{"type":46,"tag":338,"props":1587,"children":1588},{"style":362},[1589],{"type":52,"value":376},{"type":46,"tag":338,"props":1591,"children":1592},{"style":362},[1593],{"type":52,"value":1594}," },\n",{"type":46,"tag":338,"props":1596,"children":1597},{"class":340,"line":434},[1598,1602,1606,1610,1614,1618,1622,1626,1630,1634,1638,1642,1646,1651,1655],{"type":46,"tag":338,"props":1599,"children":1600},{"style":502},[1601],{"type":52,"value":566},{"type":46,"tag":338,"props":1603,"children":1604},{"style":362},[1605],{"type":52,"value":510},{"type":46,"tag":338,"props":1607,"children":1608},{"style":362},[1609],{"type":52,"value":575},{"type":46,"tag":338,"props":1611,"children":1612},{"style":502},[1613],{"type":52,"value":580},{"type":46,"tag":338,"props":1615,"children":1616},{"style":362},[1617],{"type":52,"value":510},{"type":46,"tag":338,"props":1619,"children":1620},{"style":362},[1621],{"type":52,"value":365},{"type":46,"tag":338,"props":1623,"children":1624},{"style":368},[1625],{"type":52,"value":593},{"type":46,"tag":338,"props":1627,"children":1628},{"style":362},[1629],{"type":52,"value":376},{"type":46,"tag":338,"props":1631,"children":1632},{"style":362},[1633],{"type":52,"value":602},{"type":46,"tag":338,"props":1635,"children":1636},{"style":502},[1637],{"type":52,"value":607},{"type":46,"tag":338,"props":1639,"children":1640},{"style":362},[1641],{"type":52,"value":510},{"type":46,"tag":338,"props":1643,"children":1644},{"style":362},[1645],{"type":52,"value":365},{"type":46,"tag":338,"props":1647,"children":1648},{"style":368},[1649],{"type":52,"value":1650},"Noah",{"type":46,"tag":338,"props":1652,"children":1653},{"style":362},[1654],{"type":52,"value":376},{"type":46,"tag":338,"props":1656,"children":1657},{"style":362},[1658],{"type":52,"value":629},{"type":46,"tag":338,"props":1660,"children":1661},{"class":340,"line":442},[1662,1666,1670,1674,1678,1682],{"type":46,"tag":338,"props":1663,"children":1664},{"style":362},[1665],{"type":52,"value":638},{"type":46,"tag":338,"props":1667,"children":1668},{"style":351},[1669],{"type":52,"value":643},{"type":46,"tag":338,"props":1671,"children":1672},{"style":362},[1673],{"type":52,"value":471},{"type":46,"tag":338,"props":1675,"children":1676},{"style":419},[1677],{"type":52,"value":652},{"type":46,"tag":338,"props":1679,"children":1680},{"style":351},[1681],{"type":52,"value":427},{"type":46,"tag":338,"props":1683,"children":1684},{"style":362},[1685],{"type":52,"value":381},{"type":46,"tag":109,"props":1687,"children":1689},{"id":1688},"integration-pattern",[1690],{"type":52,"value":1691},"Integration Pattern",{"type":46,"tag":320,"props":1693,"children":1695},{"id":1694},"expressjs-text-to-speech-endpoint",[1696],{"type":52,"value":1697},"Express.js — Text-to-Speech Endpoint",{"type":46,"tag":327,"props":1699,"children":1701},{"className":329,"code":1700,"language":331,"meta":332,"style":332},"import RunwayML from '@runwayml\u002Fsdk';\nimport express from 'express';\n\nconst client = new RunwayML();\nconst app = express();\napp.use(express.json());\n\napp.post('\u002Fapi\u002Ftext-to-speech', async (req, res) => {\n  try {\n    const { text, voiceId } = req.body;\n\n    const task = await client.textToSpeech.create({\n      model: 'eleven_multilingual_v2',\n      promptText: text,\n      voice: { type: 'runway-preset', presetId: voiceId || 'Maya' }\n    }).waitForTaskOutput();\n\n    res.json({ audioUrl: task.output[0] });\n  } catch (error) {\n    console.error('TTS failed:', error);\n    res.status(500).json({ error: error.message });\n  }\n});\n",[1702],{"type":46,"tag":71,"props":1703,"children":1704},{"__ignoreMap":332},[1705,1736,1769,1776,1807,1836,1876,1883,1959,1971,2025,2032,2080,2109,2130,2203,2232,2240,2314,2346,2397,2476,2485],{"type":46,"tag":338,"props":1706,"children":1707},{"class":340,"line":341},[1708,1712,1716,1720,1724,1728,1732],{"type":46,"tag":338,"props":1709,"children":1710},{"style":345},[1711],{"type":52,"value":348},{"type":46,"tag":338,"props":1713,"children":1714},{"style":351},[1715],{"type":52,"value":354},{"type":46,"tag":338,"props":1717,"children":1718},{"style":345},[1719],{"type":52,"value":359},{"type":46,"tag":338,"props":1721,"children":1722},{"style":362},[1723],{"type":52,"value":365},{"type":46,"tag":338,"props":1725,"children":1726},{"style":368},[1727],{"type":52,"value":371},{"type":46,"tag":338,"props":1729,"children":1730},{"style":362},[1731],{"type":52,"value":376},{"type":46,"tag":338,"props":1733,"children":1734},{"style":362},[1735],{"type":52,"value":381},{"type":46,"tag":338,"props":1737,"children":1738},{"class":340,"line":384},[1739,1743,1748,1752,1756,1761,1765],{"type":46,"tag":338,"props":1740,"children":1741},{"style":345},[1742],{"type":52,"value":348},{"type":46,"tag":338,"props":1744,"children":1745},{"style":351},[1746],{"type":52,"value":1747}," express ",{"type":46,"tag":338,"props":1749,"children":1750},{"style":345},[1751],{"type":52,"value":359},{"type":46,"tag":338,"props":1753,"children":1754},{"style":362},[1755],{"type":52,"value":365},{"type":46,"tag":338,"props":1757,"children":1758},{"style":368},[1759],{"type":52,"value":1760},"express",{"type":46,"tag":338,"props":1762,"children":1763},{"style":362},[1764],{"type":52,"value":376},{"type":46,"tag":338,"props":1766,"children":1767},{"style":362},[1768],{"type":52,"value":381},{"type":46,"tag":338,"props":1770,"children":1771},{"class":340,"line":394},[1772],{"type":46,"tag":338,"props":1773,"children":1774},{"emptyLinePlaceholder":388},[1775],{"type":52,"value":391},{"type":46,"tag":338,"props":1777,"children":1778},{"class":340,"line":434},[1779,1783,1787,1791,1795,1799,1803],{"type":46,"tag":338,"props":1780,"children":1781},{"style":398},[1782],{"type":52,"value":401},{"type":46,"tag":338,"props":1784,"children":1785},{"style":351},[1786],{"type":52,"value":406},{"type":46,"tag":338,"props":1788,"children":1789},{"style":362},[1790],{"type":52,"value":411},{"type":46,"tag":338,"props":1792,"children":1793},{"style":362},[1794],{"type":52,"value":416},{"type":46,"tag":338,"props":1796,"children":1797},{"style":419},[1798],{"type":52,"value":422},{"type":46,"tag":338,"props":1800,"children":1801},{"style":351},[1802],{"type":52,"value":427},{"type":46,"tag":338,"props":1804,"children":1805},{"style":362},[1806],{"type":52,"value":381},{"type":46,"tag":338,"props":1808,"children":1809},{"class":340,"line":442},[1810,1814,1819,1823,1828,1832],{"type":46,"tag":338,"props":1811,"children":1812},{"style":398},[1813],{"type":52,"value":401},{"type":46,"tag":338,"props":1815,"children":1816},{"style":351},[1817],{"type":52,"value":1818}," app ",{"type":46,"tag":338,"props":1820,"children":1821},{"style":362},[1822],{"type":52,"value":411},{"type":46,"tag":338,"props":1824,"children":1825},{"style":419},[1826],{"type":52,"value":1827}," express",{"type":46,"tag":338,"props":1829,"children":1830},{"style":351},[1831],{"type":52,"value":427},{"type":46,"tag":338,"props":1833,"children":1834},{"style":362},[1835],{"type":52,"value":381},{"type":46,"tag":338,"props":1837,"children":1838},{"class":340,"line":498},[1839,1844,1848,1853,1858,1862,1867,1872],{"type":46,"tag":338,"props":1840,"children":1841},{"style":351},[1842],{"type":52,"value":1843},"app",{"type":46,"tag":338,"props":1845,"children":1846},{"style":362},[1847],{"type":52,"value":471},{"type":46,"tag":338,"props":1849,"children":1850},{"style":419},[1851],{"type":52,"value":1852},"use",{"type":46,"tag":338,"props":1854,"children":1855},{"style":351},[1856],{"type":52,"value":1857},"(express",{"type":46,"tag":338,"props":1859,"children":1860},{"style":362},[1861],{"type":52,"value":471},{"type":46,"tag":338,"props":1863,"children":1864},{"style":419},[1865],{"type":52,"value":1866},"json",{"type":46,"tag":338,"props":1868,"children":1869},{"style":351},[1870],{"type":52,"value":1871},"())",{"type":46,"tag":338,"props":1873,"children":1874},{"style":362},[1875],{"type":52,"value":381},{"type":46,"tag":338,"props":1877,"children":1878},{"class":340,"line":530},[1879],{"type":46,"tag":338,"props":1880,"children":1881},{"emptyLinePlaceholder":388},[1882],{"type":52,"value":391},{"type":46,"tag":338,"props":1884,"children":1885},{"class":340,"line":560},[1886,1890,1894,1899,1903,1907,1912,1916,1920,1925,1930,1936,1940,1945,1949,1954],{"type":46,"tag":338,"props":1887,"children":1888},{"style":351},[1889],{"type":52,"value":1843},{"type":46,"tag":338,"props":1891,"children":1892},{"style":362},[1893],{"type":52,"value":471},{"type":46,"tag":338,"props":1895,"children":1896},{"style":419},[1897],{"type":52,"value":1898},"post",{"type":46,"tag":338,"props":1900,"children":1901},{"style":351},[1902],{"type":52,"value":490},{"type":46,"tag":338,"props":1904,"children":1905},{"style":362},[1906],{"type":52,"value":376},{"type":46,"tag":338,"props":1908,"children":1909},{"style":368},[1910],{"type":52,"value":1911},"\u002Fapi\u002Ftext-to-speech",{"type":46,"tag":338,"props":1913,"children":1914},{"style":362},[1915],{"type":52,"value":376},{"type":46,"tag":338,"props":1917,"children":1918},{"style":362},[1919],{"type":52,"value":602},{"type":46,"tag":338,"props":1921,"children":1922},{"style":398},[1923],{"type":52,"value":1924}," async",{"type":46,"tag":338,"props":1926,"children":1927},{"style":362},[1928],{"type":52,"value":1929}," (",{"type":46,"tag":338,"props":1931,"children":1933},{"style":1932},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[1934],{"type":52,"value":1935},"req",{"type":46,"tag":338,"props":1937,"children":1938},{"style":362},[1939],{"type":52,"value":602},{"type":46,"tag":338,"props":1941,"children":1942},{"style":1932},[1943],{"type":52,"value":1944}," res",{"type":46,"tag":338,"props":1946,"children":1947},{"style":362},[1948],{"type":52,"value":643},{"type":46,"tag":338,"props":1950,"children":1951},{"style":398},[1952],{"type":52,"value":1953}," =>",{"type":46,"tag":338,"props":1955,"children":1956},{"style":362},[1957],{"type":52,"value":1958}," {\n",{"type":46,"tag":338,"props":1960,"children":1961},{"class":340,"line":632},[1962,1967],{"type":46,"tag":338,"props":1963,"children":1964},{"style":345},[1965],{"type":52,"value":1966},"  try",{"type":46,"tag":338,"props":1968,"children":1969},{"style":362},[1970],{"type":52,"value":1958},{"type":46,"tag":338,"props":1972,"children":1973},{"class":340,"line":663},[1974,1979,1983,1988,1992,1997,2002,2007,2012,2016,2021],{"type":46,"tag":338,"props":1975,"children":1976},{"style":398},[1977],{"type":52,"value":1978},"    const",{"type":46,"tag":338,"props":1980,"children":1981},{"style":362},[1982],{"type":52,"value":575},{"type":46,"tag":338,"props":1984,"children":1985},{"style":351},[1986],{"type":52,"value":1987}," text",{"type":46,"tag":338,"props":1989,"children":1990},{"style":362},[1991],{"type":52,"value":602},{"type":46,"tag":338,"props":1993,"children":1994},{"style":351},[1995],{"type":52,"value":1996}," voiceId",{"type":46,"tag":338,"props":1998,"children":1999},{"style":362},[2000],{"type":52,"value":2001}," }",{"type":46,"tag":338,"props":2003,"children":2004},{"style":362},[2005],{"type":52,"value":2006}," =",{"type":46,"tag":338,"props":2008,"children":2009},{"style":351},[2010],{"type":52,"value":2011}," req",{"type":46,"tag":338,"props":2013,"children":2014},{"style":362},[2015],{"type":52,"value":471},{"type":46,"tag":338,"props":2017,"children":2018},{"style":351},[2019],{"type":52,"value":2020},"body",{"type":46,"tag":338,"props":2022,"children":2023},{"style":362},[2024],{"type":52,"value":381},{"type":46,"tag":338,"props":2026,"children":2027},{"class":340,"line":671},[2028],{"type":46,"tag":338,"props":2029,"children":2030},{"emptyLinePlaceholder":388},[2031],{"type":52,"value":391},{"type":46,"tag":338,"props":2033,"children":2035},{"class":340,"line":2034},12,[2036,2040,2044,2048,2052,2056,2060,2064,2068,2072,2076],{"type":46,"tag":338,"props":2037,"children":2038},{"style":398},[2039],{"type":52,"value":1978},{"type":46,"tag":338,"props":2041,"children":2042},{"style":351},[2043],{"type":52,"value":690},{"type":46,"tag":338,"props":2045,"children":2046},{"style":362},[2047],{"type":52,"value":2006},{"type":46,"tag":338,"props":2049,"children":2050},{"style":345},[2051],{"type":52,"value":461},{"type":46,"tag":338,"props":2053,"children":2054},{"style":351},[2055],{"type":52,"value":466},{"type":46,"tag":338,"props":2057,"children":2058},{"style":362},[2059],{"type":52,"value":471},{"type":46,"tag":338,"props":2061,"children":2062},{"style":351},[2063],{"type":52,"value":476},{"type":46,"tag":338,"props":2065,"children":2066},{"style":362},[2067],{"type":52,"value":471},{"type":46,"tag":338,"props":2069,"children":2070},{"style":419},[2071],{"type":52,"value":485},{"type":46,"tag":338,"props":2073,"children":2074},{"style":502},[2075],{"type":52,"value":490},{"type":46,"tag":338,"props":2077,"children":2078},{"style":362},[2079],{"type":52,"value":495},{"type":46,"tag":338,"props":2081,"children":2083},{"class":340,"line":2082},13,[2084,2089,2093,2097,2101,2105],{"type":46,"tag":338,"props":2085,"children":2086},{"style":502},[2087],{"type":52,"value":2088},"      model",{"type":46,"tag":338,"props":2090,"children":2091},{"style":362},[2092],{"type":52,"value":510},{"type":46,"tag":338,"props":2094,"children":2095},{"style":362},[2096],{"type":52,"value":365},{"type":46,"tag":338,"props":2098,"children":2099},{"style":368},[2100],{"type":52,"value":164},{"type":46,"tag":338,"props":2102,"children":2103},{"style":362},[2104],{"type":52,"value":376},{"type":46,"tag":338,"props":2106,"children":2107},{"style":362},[2108],{"type":52,"value":527},{"type":46,"tag":338,"props":2110,"children":2112},{"class":340,"line":2111},14,[2113,2118,2122,2126],{"type":46,"tag":338,"props":2114,"children":2115},{"style":502},[2116],{"type":52,"value":2117},"      promptText",{"type":46,"tag":338,"props":2119,"children":2120},{"style":362},[2121],{"type":52,"value":510},{"type":46,"tag":338,"props":2123,"children":2124},{"style":351},[2125],{"type":52,"value":1987},{"type":46,"tag":338,"props":2127,"children":2128},{"style":362},[2129],{"type":52,"value":527},{"type":46,"tag":338,"props":2131,"children":2132},{"class":340,"line":31},[2133,2138,2142,2146,2150,2154,2158,2162,2166,2170,2174,2178,2182,2187,2191,2195,2199],{"type":46,"tag":338,"props":2134,"children":2135},{"style":502},[2136],{"type":52,"value":2137},"      voice",{"type":46,"tag":338,"props":2139,"children":2140},{"style":362},[2141],{"type":52,"value":510},{"type":46,"tag":338,"props":2143,"children":2144},{"style":362},[2145],{"type":52,"value":575},{"type":46,"tag":338,"props":2147,"children":2148},{"style":502},[2149],{"type":52,"value":580},{"type":46,"tag":338,"props":2151,"children":2152},{"style":362},[2153],{"type":52,"value":510},{"type":46,"tag":338,"props":2155,"children":2156},{"style":362},[2157],{"type":52,"value":365},{"type":46,"tag":338,"props":2159,"children":2160},{"style":368},[2161],{"type":52,"value":593},{"type":46,"tag":338,"props":2163,"children":2164},{"style":362},[2165],{"type":52,"value":376},{"type":46,"tag":338,"props":2167,"children":2168},{"style":362},[2169],{"type":52,"value":602},{"type":46,"tag":338,"props":2171,"children":2172},{"style":502},[2173],{"type":52,"value":607},{"type":46,"tag":338,"props":2175,"children":2176},{"style":362},[2177],{"type":52,"value":510},{"type":46,"tag":338,"props":2179,"children":2180},{"style":351},[2181],{"type":52,"value":1996},{"type":46,"tag":338,"props":2183,"children":2184},{"style":362},[2185],{"type":52,"value":2186}," ||",{"type":46,"tag":338,"props":2188,"children":2189},{"style":362},[2190],{"type":52,"value":365},{"type":46,"tag":338,"props":2192,"children":2193},{"style":368},[2194],{"type":52,"value":620},{"type":46,"tag":338,"props":2196,"children":2197},{"style":362},[2198],{"type":52,"value":376},{"type":46,"tag":338,"props":2200,"children":2201},{"style":362},[2202],{"type":52,"value":629},{"type":46,"tag":338,"props":2204,"children":2206},{"class":340,"line":2205},16,[2207,2212,2216,2220,2224,2228],{"type":46,"tag":338,"props":2208,"children":2209},{"style":362},[2210],{"type":52,"value":2211},"    }",{"type":46,"tag":338,"props":2213,"children":2214},{"style":502},[2215],{"type":52,"value":643},{"type":46,"tag":338,"props":2217,"children":2218},{"style":362},[2219],{"type":52,"value":471},{"type":46,"tag":338,"props":2221,"children":2222},{"style":419},[2223],{"type":52,"value":652},{"type":46,"tag":338,"props":2225,"children":2226},{"style":502},[2227],{"type":52,"value":427},{"type":46,"tag":338,"props":2229,"children":2230},{"style":362},[2231],{"type":52,"value":381},{"type":46,"tag":338,"props":2233,"children":2235},{"class":340,"line":2234},17,[2236],{"type":46,"tag":338,"props":2237,"children":2238},{"emptyLinePlaceholder":388},[2239],{"type":52,"value":391},{"type":46,"tag":338,"props":2241,"children":2243},{"class":340,"line":2242},18,[2244,2249,2253,2257,2261,2266,2271,2275,2279,2283,2288,2293,2297,2302,2306,2310],{"type":46,"tag":338,"props":2245,"children":2246},{"style":351},[2247],{"type":52,"value":2248},"    res",{"type":46,"tag":338,"props":2250,"children":2251},{"style":362},[2252],{"type":52,"value":471},{"type":46,"tag":338,"props":2254,"children":2255},{"style":419},[2256],{"type":52,"value":1866},{"type":46,"tag":338,"props":2258,"children":2259},{"style":502},[2260],{"type":52,"value":490},{"type":46,"tag":338,"props":2262,"children":2263},{"style":362},[2264],{"type":52,"value":2265},"{",{"type":46,"tag":338,"props":2267,"children":2268},{"style":502},[2269],{"type":52,"value":2270}," audioUrl",{"type":46,"tag":338,"props":2272,"children":2273},{"style":362},[2274],{"type":52,"value":510},{"type":46,"tag":338,"props":2276,"children":2277},{"style":351},[2278],{"type":52,"value":690},{"type":46,"tag":338,"props":2280,"children":2281},{"style":362},[2282],{"type":52,"value":471},{"type":46,"tag":338,"props":2284,"children":2285},{"style":351},[2286],{"type":52,"value":2287},"output",{"type":46,"tag":338,"props":2289,"children":2290},{"style":502},[2291],{"type":52,"value":2292},"[",{"type":46,"tag":338,"props":2294,"children":2295},{"style":702},[2296],{"type":52,"value":705},{"type":46,"tag":338,"props":2298,"children":2299},{"style":502},[2300],{"type":52,"value":2301},"] ",{"type":46,"tag":338,"props":2303,"children":2304},{"style":362},[2305],{"type":52,"value":638},{"type":46,"tag":338,"props":2307,"children":2308},{"style":502},[2309],{"type":52,"value":643},{"type":46,"tag":338,"props":2311,"children":2312},{"style":362},[2313],{"type":52,"value":381},{"type":46,"tag":338,"props":2315,"children":2317},{"class":340,"line":2316},19,[2318,2323,2328,2332,2337,2342],{"type":46,"tag":338,"props":2319,"children":2320},{"style":362},[2321],{"type":52,"value":2322},"  }",{"type":46,"tag":338,"props":2324,"children":2325},{"style":345},[2326],{"type":52,"value":2327}," catch",{"type":46,"tag":338,"props":2329,"children":2330},{"style":502},[2331],{"type":52,"value":1929},{"type":46,"tag":338,"props":2333,"children":2334},{"style":351},[2335],{"type":52,"value":2336},"error",{"type":46,"tag":338,"props":2338,"children":2339},{"style":502},[2340],{"type":52,"value":2341},") ",{"type":46,"tag":338,"props":2343,"children":2344},{"style":362},[2345],{"type":52,"value":495},{"type":46,"tag":338,"props":2347,"children":2349},{"class":340,"line":2348},20,[2350,2355,2359,2363,2367,2371,2376,2380,2384,2389,2393],{"type":46,"tag":338,"props":2351,"children":2352},{"style":351},[2353],{"type":52,"value":2354},"    console",{"type":46,"tag":338,"props":2356,"children":2357},{"style":362},[2358],{"type":52,"value":471},{"type":46,"tag":338,"props":2360,"children":2361},{"style":419},[2362],{"type":52,"value":2336},{"type":46,"tag":338,"props":2364,"children":2365},{"style":502},[2366],{"type":52,"value":490},{"type":46,"tag":338,"props":2368,"children":2369},{"style":362},[2370],{"type":52,"value":376},{"type":46,"tag":338,"props":2372,"children":2373},{"style":368},[2374],{"type":52,"value":2375},"TTS failed:",{"type":46,"tag":338,"props":2377,"children":2378},{"style":362},[2379],{"type":52,"value":376},{"type":46,"tag":338,"props":2381,"children":2382},{"style":362},[2383],{"type":52,"value":602},{"type":46,"tag":338,"props":2385,"children":2386},{"style":351},[2387],{"type":52,"value":2388}," error",{"type":46,"tag":338,"props":2390,"children":2391},{"style":502},[2392],{"type":52,"value":643},{"type":46,"tag":338,"props":2394,"children":2395},{"style":362},[2396],{"type":52,"value":381},{"type":46,"tag":338,"props":2398,"children":2400},{"class":340,"line":2399},21,[2401,2405,2409,2414,2418,2423,2427,2431,2435,2439,2443,2447,2451,2455,2459,2464,2468,2472],{"type":46,"tag":338,"props":2402,"children":2403},{"style":351},[2404],{"type":52,"value":2248},{"type":46,"tag":338,"props":2406,"children":2407},{"style":362},[2408],{"type":52,"value":471},{"type":46,"tag":338,"props":2410,"children":2411},{"style":419},[2412],{"type":52,"value":2413},"status",{"type":46,"tag":338,"props":2415,"children":2416},{"style":502},[2417],{"type":52,"value":490},{"type":46,"tag":338,"props":2419,"children":2420},{"style":702},[2421],{"type":52,"value":2422},"500",{"type":46,"tag":338,"props":2424,"children":2425},{"style":502},[2426],{"type":52,"value":643},{"type":46,"tag":338,"props":2428,"children":2429},{"style":362},[2430],{"type":52,"value":471},{"type":46,"tag":338,"props":2432,"children":2433},{"style":419},[2434],{"type":52,"value":1866},{"type":46,"tag":338,"props":2436,"children":2437},{"style":502},[2438],{"type":52,"value":490},{"type":46,"tag":338,"props":2440,"children":2441},{"style":362},[2442],{"type":52,"value":2265},{"type":46,"tag":338,"props":2444,"children":2445},{"style":502},[2446],{"type":52,"value":2388},{"type":46,"tag":338,"props":2448,"children":2449},{"style":362},[2450],{"type":52,"value":510},{"type":46,"tag":338,"props":2452,"children":2453},{"style":351},[2454],{"type":52,"value":2388},{"type":46,"tag":338,"props":2456,"children":2457},{"style":362},[2458],{"type":52,"value":471},{"type":46,"tag":338,"props":2460,"children":2461},{"style":351},[2462],{"type":52,"value":2463},"message",{"type":46,"tag":338,"props":2465,"children":2466},{"style":362},[2467],{"type":52,"value":2001},{"type":46,"tag":338,"props":2469,"children":2470},{"style":502},[2471],{"type":52,"value":643},{"type":46,"tag":338,"props":2473,"children":2474},{"style":362},[2475],{"type":52,"value":381},{"type":46,"tag":338,"props":2477,"children":2479},{"class":340,"line":2478},22,[2480],{"type":46,"tag":338,"props":2481,"children":2482},{"style":362},[2483],{"type":52,"value":2484},"  }\n",{"type":46,"tag":338,"props":2486,"children":2488},{"class":340,"line":2487},23,[2489,2493,2497],{"type":46,"tag":338,"props":2490,"children":2491},{"style":362},[2492],{"type":52,"value":638},{"type":46,"tag":338,"props":2494,"children":2495},{"style":351},[2496],{"type":52,"value":643},{"type":46,"tag":338,"props":2498,"children":2499},{"style":362},[2500],{"type":52,"value":381},{"type":46,"tag":320,"props":2502,"children":2504},{"id":2503},"fastapi-sound-effects",[2505],{"type":52,"value":2506},"FastAPI — Sound Effects",{"type":46,"tag":327,"props":2508,"children":2510},{"className":723,"code":2509,"language":725,"meta":332,"style":332},"from fastapi import FastAPI, HTTPException\nfrom pydantic import BaseModel\nfrom runwayml import RunwayML\n\napp = FastAPI()\nclient = RunwayML()\n\nclass SoundRequest(BaseModel):\n    prompt: str\n\n@app.post(\"\u002Fapi\u002Fsound-effect\")\nasync def generate_sound(req: SoundRequest):\n    try:\n        task = client.sound_effect.create(\n            model='eleven_text_to_sound_v2',\n            prompt_text=req.prompt\n        ).wait_for_task_output()\n        return {\"audio_url\": task.output[0]}\n    except Exception as e:\n        raise HTTPException(status_code=500, detail=str(e))\n",[2511],{"type":46,"tag":71,"props":2512,"children":2513},{"__ignoreMap":332},[2514,2522,2530,2537,2544,2552,2559,2566,2574,2582,2589,2597,2605,2613,2621,2629,2637,2645,2653,2661],{"type":46,"tag":338,"props":2515,"children":2516},{"class":340,"line":341},[2517],{"type":46,"tag":338,"props":2518,"children":2519},{},[2520],{"type":52,"value":2521},"from fastapi import FastAPI, HTTPException\n",{"type":46,"tag":338,"props":2523,"children":2524},{"class":340,"line":384},[2525],{"type":46,"tag":338,"props":2526,"children":2527},{},[2528],{"type":52,"value":2529},"from pydantic import BaseModel\n",{"type":46,"tag":338,"props":2531,"children":2532},{"class":340,"line":394},[2533],{"type":46,"tag":338,"props":2534,"children":2535},{},[2536],{"type":52,"value":737},{"type":46,"tag":338,"props":2538,"children":2539},{"class":340,"line":434},[2540],{"type":46,"tag":338,"props":2541,"children":2542},{"emptyLinePlaceholder":388},[2543],{"type":52,"value":391},{"type":46,"tag":338,"props":2545,"children":2546},{"class":340,"line":442},[2547],{"type":46,"tag":338,"props":2548,"children":2549},{},[2550],{"type":52,"value":2551},"app = FastAPI()\n",{"type":46,"tag":338,"props":2553,"children":2554},{"class":340,"line":498},[2555],{"type":46,"tag":338,"props":2556,"children":2557},{},[2558],{"type":52,"value":752},{"type":46,"tag":338,"props":2560,"children":2561},{"class":340,"line":530},[2562],{"type":46,"tag":338,"props":2563,"children":2564},{"emptyLinePlaceholder":388},[2565],{"type":52,"value":391},{"type":46,"tag":338,"props":2567,"children":2568},{"class":340,"line":560},[2569],{"type":46,"tag":338,"props":2570,"children":2571},{},[2572],{"type":52,"value":2573},"class SoundRequest(BaseModel):\n",{"type":46,"tag":338,"props":2575,"children":2576},{"class":340,"line":632},[2577],{"type":46,"tag":338,"props":2578,"children":2579},{},[2580],{"type":52,"value":2581},"    prompt: str\n",{"type":46,"tag":338,"props":2583,"children":2584},{"class":340,"line":663},[2585],{"type":46,"tag":338,"props":2586,"children":2587},{"emptyLinePlaceholder":388},[2588],{"type":52,"value":391},{"type":46,"tag":338,"props":2590,"children":2591},{"class":340,"line":671},[2592],{"type":46,"tag":338,"props":2593,"children":2594},{},[2595],{"type":52,"value":2596},"@app.post(\"\u002Fapi\u002Fsound-effect\")\n",{"type":46,"tag":338,"props":2598,"children":2599},{"class":340,"line":2034},[2600],{"type":46,"tag":338,"props":2601,"children":2602},{},[2603],{"type":52,"value":2604},"async def generate_sound(req: SoundRequest):\n",{"type":46,"tag":338,"props":2606,"children":2607},{"class":340,"line":2082},[2608],{"type":46,"tag":338,"props":2609,"children":2610},{},[2611],{"type":52,"value":2612},"    try:\n",{"type":46,"tag":338,"props":2614,"children":2615},{"class":340,"line":2111},[2616],{"type":46,"tag":338,"props":2617,"children":2618},{},[2619],{"type":52,"value":2620},"        task = client.sound_effect.create(\n",{"type":46,"tag":338,"props":2622,"children":2623},{"class":340,"line":31},[2624],{"type":46,"tag":338,"props":2625,"children":2626},{},[2627],{"type":52,"value":2628},"            model='eleven_text_to_sound_v2',\n",{"type":46,"tag":338,"props":2630,"children":2631},{"class":340,"line":2205},[2632],{"type":46,"tag":338,"props":2633,"children":2634},{},[2635],{"type":52,"value":2636},"            prompt_text=req.prompt\n",{"type":46,"tag":338,"props":2638,"children":2639},{"class":340,"line":2234},[2640],{"type":46,"tag":338,"props":2641,"children":2642},{},[2643],{"type":52,"value":2644},"        ).wait_for_task_output()\n",{"type":46,"tag":338,"props":2646,"children":2647},{"class":340,"line":2242},[2648],{"type":46,"tag":338,"props":2649,"children":2650},{},[2651],{"type":52,"value":2652},"        return {\"audio_url\": task.output[0]}\n",{"type":46,"tag":338,"props":2654,"children":2655},{"class":340,"line":2316},[2656],{"type":46,"tag":338,"props":2657,"children":2658},{},[2659],{"type":52,"value":2660},"    except Exception as e:\n",{"type":46,"tag":338,"props":2662,"children":2663},{"class":340,"line":2348},[2664],{"type":46,"tag":338,"props":2665,"children":2666},{},[2667],{"type":52,"value":2668},"        raise HTTPException(status_code=500, detail=str(e))\n",{"type":46,"tag":109,"props":2670,"children":2672},{"id":2671},"tips",[2673],{"type":52,"value":2674},"Tips",{"type":46,"tag":2676,"props":2677,"children":2678},"ul",{},[2679,2690,2707,2725],{"type":46,"tag":2680,"props":2681,"children":2682},"li",{},[2683,2688],{"type":46,"tag":63,"props":2684,"children":2685},{},[2686],{"type":52,"value":2687},"Output URLs expire in 24-48 hours.",{"type":52,"value":2689}," Download audio files to your own storage.",{"type":46,"tag":2680,"props":2691,"children":2692},{},[2693,2698,2700,2705],{"type":46,"tag":63,"props":2694,"children":2695},{},[2696],{"type":52,"value":2697},"For local audio files",{"type":52,"value":2699}," (voice isolation, dubbing, speech-to-speech), upload via ",{"type":46,"tag":71,"props":2701,"children":2703},{"className":2702},[],[2704],{"type":52,"value":100},{"type":52,"value":2706}," first.",{"type":46,"tag":2680,"props":2708,"children":2709},{},[2710,2715,2717,2723],{"type":46,"tag":63,"props":2711,"children":2712},{},[2713],{"type":52,"value":2714},"Voice IDs",{"type":52,"value":2716}," can be listed via the voices endpoint — see ",{"type":46,"tag":71,"props":2718,"children":2720},{"className":2719},[],[2721],{"type":52,"value":2722},"+rw-api-reference",{"type":52,"value":2724}," for details.",{"type":46,"tag":2680,"props":2726,"children":2727},{},[2728,2733],{"type":46,"tag":63,"props":2729,"children":2730},{},[2731],{"type":52,"value":2732},"Text-to-speech cost",{"type":52,"value":2734}," scales with text length: 1 credit per 50 characters.",{"type":46,"tag":2736,"props":2737,"children":2738},"style",{},[2739],{"type":52,"value":2740},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2742,"total":2242},[2743,2760,2769,2783,2798,2809,2822,2833,2841,2859,2870,2890],{"slug":2744,"name":2744,"fn":2745,"description":2746,"org":2747,"tags":2748,"stars":27,"repoUrl":28,"updatedAt":2759},"rw-api-reference","look up Runway API reference","Complete reference for Runway's public API: models, endpoints, costs, limits, and types",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2749,2752,2753,2756],{"name":2750,"slug":2751,"type":16},"AI Infrastructure","ai-infrastructure",{"name":22,"slug":23,"type":16},{"name":2754,"slug":2755,"type":16},"Reference","reference",{"name":2757,"slug":2758,"type":16},"Video","video","2026-04-08T04:41:58.820783",{"slug":2761,"name":2761,"fn":2762,"description":2763,"org":2764,"tags":2765,"stars":27,"repoUrl":28,"updatedAt":2768},"rw-check-compatibility","verify codebase compatibility with the Runway API","Analyze a user's codebase to verify it can use Runway's public API (server-side requirement)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2766,2767],{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:01.271257",{"slug":2770,"name":2770,"fn":2771,"description":2772,"org":2773,"tags":2774,"stars":27,"repoUrl":28,"updatedAt":2782},"rw-check-org-details","query Runway API for organization details","Query the Runway API for organization details: rate limits, credit balance, usage tier, and daily generation counts",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2775,2778,2781],{"name":2776,"slug":2777,"type":16},"Operations","operations",{"name":2779,"slug":2780,"type":16},"Reporting","reporting",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:00.054235",{"slug":2784,"name":2784,"fn":2785,"description":2786,"org":2787,"tags":2788,"stars":27,"repoUrl":28,"updatedAt":2797},"rw-fetch-api-reference","retrieve Runway API reference","Retrieve the latest Runway API reference from docs.dev.runwayml.com and use it as the authoritative source before any integration work",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2789,2790,2793,2796],{"name":22,"slug":23,"type":16},{"name":2791,"slug":2792,"type":16},"Documentation","documentation",{"name":2794,"slug":2795,"type":16},"Research","research",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:07.604739",{"slug":2799,"name":2799,"fn":2800,"description":2801,"org":2802,"tags":2803,"stars":27,"repoUrl":28,"updatedAt":2808},"rw-generate-audio","generate audio with Runway API","Generate audio using the Runway API via runnable scripts. Supports TTS, sound effects, voice isolation, dubbing, and voice conversion.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2804,2805,2806,2807],{"name":2750,"slug":2751,"type":16},{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},"2026-04-17T04:51:59.892185",{"slug":2810,"name":2810,"fn":2811,"description":2812,"org":2813,"tags":2814,"stars":27,"repoUrl":28,"updatedAt":2821},"rw-generate-image","generate images with Runway API","Generate images directly using the Runway API via runnable scripts. Supports text-to-image with optional reference images.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2815,2816,2817,2820],{"name":2750,"slug":2751,"type":16},{"name":14,"slug":15,"type":16},{"name":2818,"slug":2819,"type":16},"Image Generation","image-generation",{"name":9,"slug":8,"type":16},"2026-04-17T04:52:01.158325",{"slug":2823,"name":2823,"fn":2824,"description":2825,"org":2826,"tags":2827,"stars":27,"repoUrl":28,"updatedAt":2832},"rw-generate-video","generate videos with Runway API","Generate videos directly using the Runway API via runnable scripts. Supports text-to-video, image-to-video, and video-to-video with seedance2, gen4.5, veo3, and more.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2828,2829,2830,2831],{"name":2750,"slug":2751,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":2757,"slug":2758,"type":16},"2026-04-17T04:51:58.600919",{"slug":4,"name":4,"fn":5,"description":6,"org":2834,"tags":2835,"stars":27,"repoUrl":28,"updatedAt":29},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2836,2837,2838,2839,2840],{"name":22,"slug":23,"type":16},{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":25,"slug":26,"type":16},{"slug":2842,"name":2842,"fn":2843,"description":2844,"org":2845,"tags":2846,"stars":27,"repoUrl":28,"updatedAt":2858},"rw-integrate-character-embed","embed Runway characters in React apps","Help users embed Runway Character avatar calls in React apps using the @runwayml\u002Favatars-react SDK",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2847,2848,2851,2854,2855],{"name":22,"slug":23,"type":16},{"name":2849,"slug":2850,"type":16},"Frontend","frontend",{"name":2852,"slug":2853,"type":16},"React","react",{"name":9,"slug":8,"type":16},{"name":2856,"slug":2857,"type":16},"UI Components","ui-components","2026-04-08T04:42:08.849481",{"slug":2860,"name":2860,"fn":2861,"description":2862,"org":2863,"tags":2864,"stars":27,"repoUrl":28,"updatedAt":2869},"rw-integrate-characters","integrate Runway conversational characters","Help users create Runway Characters (GWM-1 avatars) and integrate real-time conversational sessions into their apps",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2865,2866,2867,2868],{"name":22,"slug":23,"type":16},{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:06.171483",{"slug":2871,"name":2871,"fn":2872,"description":2873,"org":2874,"tags":2875,"stars":27,"repoUrl":28,"updatedAt":2889},"rw-integrate-documents","add documents to Runway Characters","Help users add knowledge base documents to Runway Characters for domain-specific conversations",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2876,2879,2882,2885,2888],{"name":2877,"slug":2878,"type":16},"Agents","agents",{"name":2880,"slug":2881,"type":16},"AI Context","ai-context",{"name":2883,"slug":2884,"type":16},"Documents","documents",{"name":2886,"slug":2887,"type":16},"Knowledge Management","knowledge-management",{"name":9,"slug":8,"type":16},"2026-04-08T04:42:04.95186",{"slug":2891,"name":2891,"fn":2892,"description":2893,"org":2894,"tags":2895,"stars":27,"repoUrl":28,"updatedAt":2900},"rw-integrate-image","integrate Runway image generation APIs","Help users integrate Runway image generation APIs (text-to-image with reference images)",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2896,2897,2898,2899],{"name":22,"slug":23,"type":16},{"name":14,"slug":15,"type":16},{"name":2818,"slug":2819,"type":16},{"name":9,"slug":8,"type":16},"2026-04-08T04:42:11.322008",{"items":2902,"total":2234},[2903,2910,2915,2921,2928,2935,2942],{"slug":2744,"name":2744,"fn":2745,"description":2746,"org":2904,"tags":2905,"stars":27,"repoUrl":28,"updatedAt":2759},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2906,2907,2908,2909],{"name":2750,"slug":2751,"type":16},{"name":22,"slug":23,"type":16},{"name":2754,"slug":2755,"type":16},{"name":2757,"slug":2758,"type":16},{"slug":2761,"name":2761,"fn":2762,"description":2763,"org":2911,"tags":2912,"stars":27,"repoUrl":28,"updatedAt":2768},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2913,2914],{"name":22,"slug":23,"type":16},{"name":9,"slug":8,"type":16},{"slug":2770,"name":2770,"fn":2771,"description":2772,"org":2916,"tags":2917,"stars":27,"repoUrl":28,"updatedAt":2782},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2918,2919,2920],{"name":2776,"slug":2777,"type":16},{"name":2779,"slug":2780,"type":16},{"name":9,"slug":8,"type":16},{"slug":2784,"name":2784,"fn":2785,"description":2786,"org":2922,"tags":2923,"stars":27,"repoUrl":28,"updatedAt":2797},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2924,2925,2926,2927],{"name":22,"slug":23,"type":16},{"name":2791,"slug":2792,"type":16},{"name":2794,"slug":2795,"type":16},{"name":9,"slug":8,"type":16},{"slug":2799,"name":2799,"fn":2800,"description":2801,"org":2929,"tags":2930,"stars":27,"repoUrl":28,"updatedAt":2808},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2931,2932,2933,2934],{"name":2750,"slug":2751,"type":16},{"name":19,"slug":20,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"slug":2810,"name":2810,"fn":2811,"description":2812,"org":2936,"tags":2937,"stars":27,"repoUrl":28,"updatedAt":2821},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2938,2939,2940,2941],{"name":2750,"slug":2751,"type":16},{"name":14,"slug":15,"type":16},{"name":2818,"slug":2819,"type":16},{"name":9,"slug":8,"type":16},{"slug":2823,"name":2823,"fn":2824,"description":2825,"org":2943,"tags":2944,"stars":27,"repoUrl":28,"updatedAt":2832},{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2945,2946,2947,2948],{"name":2750,"slug":2751,"type":16},{"name":14,"slug":15,"type":16},{"name":9,"slug":8,"type":16},{"name":2757,"slug":2758,"type":16}]