{
  "id": "task_libraries:text-to-speech/javascript",
  "path": "/exapedia/javascript-text-to-speech-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript text-to-speech libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript text-to-speech libraries turn written text into spoken audio from Node.js or the browser. Most send the text or SSML markup to a cloud speech service that returns audio in a chosen voice. These libraries let voice agents, accessibility features, and audiobook tools speak text aloud."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript text-to-speech libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F130"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#elevenlabs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F149"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#deepgram-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#amazon-polly",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#microsoft-cognitiveservices-speech-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F198"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cloud-text-to-speech",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#kokoro",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F230"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cartesia-cartesia-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F251"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#elevenlabs",
          "label": [
            {
              "t": "fact",
              "fact": "F1"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads among the speech-focused SDKs in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F2"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Native text streaming",
            "In-process synthesis"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#openai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F126"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F136"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F137"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#elevenlabs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F145"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F153"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#deepgram-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F162"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#amazon-polly",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#microsoft-cognitiveservices-speech-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F194"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F205"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cloud-text-to-speech",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F213"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F221"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F222"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#kokoro",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F230"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F238"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F239"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cartesia-cartesia-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F247"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F257"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F258"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "openai",
          "name": [
            {
              "t": "fact",
              "fact": "F126"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/openai/openai-node"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/openai"
            },
            {
              "label": "Docs",
              "href": "https://github.com/openai/openai-node/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F133"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F127"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F135"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F129"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F128"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/openai/openai-node/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F143"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Mintplex-Labs/anything-llm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F143"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async ttsBuffer(textInput) {\n  try {\n    const result = await this.openai.audio.speech.create({\n      model: \"tts-1\",\n      voice: this.voice,\n      input: textInput,\n    });\n    return Buffer.from(await result.arrayBuffer());\n  } catch (e) {\n    console.error(e);\n  }\n  return null;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Mintplex-Labs/anything-llm/blob/2f6a451f55aca970311af2579088fe0c27af3ce8/server/utils/TextToSpeech/openAi/index.js#L12-L24",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F142"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=openai%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F126"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import OpenAI from 'openai';\n\nconst client = new OpenAI();\nconst audio = await client.audio.speech.create({\n  model: 'gpt-4o-mini-tts', voice: 'alloy', input: 'Hello, world!'\n});\nconst bytes = await audio.arrayBuffer();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/openai@7.60.0/resources/audio/speech.d.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "speech.d.ts"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F131"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "elevenlabs",
          "name": [
            {
              "t": "fact",
              "fact": "F145"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/elevenlabs/elevenlabs-js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@elevenlabs/elevenlabs-js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/elevenlabs/elevenlabs-js/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F11"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F148"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F147"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/elevenlabs/elevenlabs-js/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F12"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/TanStack/ai",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F160"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async generateSpeech(\n  options: TTSOptions<ElevenLabsSpeechProviderOptions>,\n): Promise<TTSResult> {\n  const { logger } = options\n  logger.request(\n    `activity=generateSpeech provider=elevenlabs model=${this.model}`,\n    { provider: 'elevenlabs', model: this.model },\n  )\n  try {\n    const {\n      outputFormat,\n      voiceSettings,\n      languageCode,\n      seed,\n      previousText,\n      nextText,\n      previousRequestIds,\n      nextRequestIds,\n      applyTextNormalization,\n      applyLanguageTextNormalization,\n      optimizeStreamingLatency,\n      enableLogging,\n    } = options.modelOptions ?? {}\n    const effectiveOutputFormat =\n      outputFormat ?? inferOutputFormatFromResponseFormat(options.format)\n    const wrapAsWav = outputFormat == null && options.format === 'wav'\n    const { format, contentType } = wrapAsWav\n      ? { format: 'wav', contentType: 'audio/wav' }\n      : parseOutputFormat(effectiveOutputFormat)\n    const requestOptions = options.abortSignal\n      ? { abortSignal: options.abortSignal }\n      : {}\n    // `format: 'wav'` asks ElevenLabs for pcm_44100 and wraps it here, on\n    // every endpoint: the byte-stream pair hands back raw bytes, the\n    // timestamped pair hands back the same bytes as base64.\n    const encodeAudio = (buffer: ArrayBuffer) =>\n      arrayBufferToBase64(wrapAsWav ? wrapPcmAsWav(buffer) : buffer)\n    const encodeAudioBase64 = (audioBase64: string) =>\n      wrapAsWav ? encodeAudio(base64ToArrayBuffer(audioBase64)) : audioBase64\n    const base = {\n      modelId: this.model,\n      ...(effectiveOutputFormat\n        ? { outputFormat: effectiveOutputFormat }\n        : {}),\n      ...(languageCode ? { languageCode } : {}),\n      ...(seed != null ? { seed } : {}),\n      ...(applyTextNormalization ? { applyTextNormalization } : {}),\n    }\n\n    // Four endpoints, picked by (turns?, timestamps?). The dialogue pair\n    // takes `inputs` instead of a voice id in the path, and the timestamped\n    // pair returns JSON (base64 audio + alignment) instead of a byte stream.\n    if (options.turns) {\n      const inputs = options.turns.map((turn) => ({\n        text: turn.text,\n        voiceId: turn.voice,\n      }))\n      const dialogue = {\n        ...base,\n        inputs,\n        ...(voiceSettings?.stability != null\n          ? { settings: { stability: voiceSettings.stability } }\n          : {}),\n      }\n\n      if (options.timestamps) {\n        const response =\n          await this.client.textToDialogue.convertWithTimestamps(\n            dialogue,\n            requestOptions,\n          )\n        return {\n          id: generateId(this.name),\n          model: this.model,\n          audio: encodeAudioBase64(response.audioBase64),\n          format,\n          contentType,\n          ...toAlignmentFields(response.alignment, response.voiceSegments),\n        }\n      }\n\n      const stream = await this.client.textToDialogue.convert(\n        dialogue,\n        requestOptions,\n      )\n      return {\n        id: generateId(this.name),\n        model: this.model,\n        audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n        format,\n        contentType,\n      }\n    }\n\n    const voiceId = options.voice ?? options.modelOptions?.voiceId\n    if (!voiceId) {\n      throw new Error(\n        'ElevenLabs TTS requires a voice. Pass `voice` on generateSpeech() or `voiceId` in modelOptions.',\n      )\n    }\n    const single = {\n      ...base,\n      text: options.text,\n      ...(voiceSettings\n        ? { voiceSettings: mapVoiceSettings(voiceSettings, options.speed) }\n        : options.speed != null\n          ? { voiceSettings: { speed: options.speed } }\n          : {}),\n      ...(previousText ? { previousText } : {}),\n      ...(nextText ? { nextText } : {}),\n      ...(previousRequestIds ? { previousRequestIds } : {}),\n      ...(nextRequestIds ? { nextRequestIds } : {}),\n      ...(applyLanguageTextNormalization != null\n        ? { applyLanguageTextNormalization }\n        : {}),\n      ...(enableLogging != null ? { enableLogging } : {}),\n    }\n\n    if (options.timestamps) {\n      const response = await this.client.textToSpeech.convertWithTimestamps(\n        voiceId,\n        single,\n        requestOptions,\n      )\n      return {\n        id: generateId(this.name),\n        model: this.model,\n        audio: encodeAudioBase64(response.audioBase64),\n        format,\n        contentType,\n        ...toAlignmentFields(response.alignment, undefined),\n      }\n    }\n\n    const stream = await this.client.textToSpeech.convert(\n      voiceId,\n      {\n        ...single,\n        ...(optimizeStreamingLatency != null\n          ? { optimizeStreamingLatency }\n          : {}),\n      },\n      requestOptions,\n    )\n\n    return {\n      id: generateId(this.name),\n      model: this.model,\n      audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n      format,\n      contentType,\n    }\n  } catch (error) {\n    logger.errors('elevenlabs.generateSpeech fatal', {\n      error,\n      source: 'elevenlabs.generateSpeech',\n    })\n    throw error\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/TanStack/ai/blob/c7f8dfd58129c5538090fc9ab8c91cd93c6125ab/packages/ai-elevenlabs/src/adapters/speech.ts#L111-L270",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F159"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20applications%20using%20%40elevenlabs/elevenlabs-js%20to%20generate%20spoken%20audio%20from%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F145"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';\n\nconst client = new ElevenLabsClient();\nconst audio = await client.textToSpeech.convert('JBFqnCBsd6RMkjVDRZzb', {\n  text: 'Hello, world!'\n});\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/elevenlabs/elevenlabs-js/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F150"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "deepgram-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F162"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/deepgram/deepgram-js-sdk"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@deepgram/sdk"
            },
            {
              "label": "Docs",
              "href": "https://github.com/deepgram/deepgram-js-sdk/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F169"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F163"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F171"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F165"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F164"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/deepgram/deepgram-js-sdk/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F162"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { DeepgramClient } from '@deepgram/sdk';\n\nconst client = new DeepgramClient();\nconst audio = await client.speak.v1.audio.generate({\n  text: 'Hello, world!', model: 'aura-2-thalia-en'\n});\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/deepgram/deepgram-js-sdk/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40deepgram/sdk%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F162"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F167"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "amazon-polly",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/aws/aws-sdk-js-v3"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@aws-sdk/client-polly"
            },
            {
              "label": "Docs",
              "href": "https://github.com/aws/aws-sdk-js-v3/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F37"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/aws/aws-sdk-js-v3/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F38"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F193"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/aws-amplify/amplify-js",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F192"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "protected async convertTextToSpeech(\n\tinput: TextToSpeechInput,\n): Promise<TextToSpeechOutput> {\n\tconst { credentials } = await this._resolveCtx().fetchAuthSession();\n\tassertValidationError(\n\t\t!!credentials,\n\t\tPredictionsValidationErrorCode.NoCredentials,\n\t);\n\tassertValidationError(\n\t\t!!input.textToSpeech?.source,\n\t\tPredictionsValidationErrorCode.NoSource,\n\t);\n\n\tconst { speechGenerator } =\n\t\tthis._resolveCtx().resourcesConfig.Predictions?.convert ?? {};\n\tassertValidationError(\n\t\t!!speechGenerator?.region,\n\t\tPredictionsValidationErrorCode.NoRegion,\n\t);\n\n\tconst { defaults = {}, region } = speechGenerator;\n\n\tconst { voiceId: defaultVoiceId } = defaults;\n\tconst voiceId = input.textToSpeech?.voiceId ?? defaultVoiceId;\n\tassertValidationError(!!voiceId, PredictionsValidationErrorCode.NoVoiceId);\n\n\tthis.pollyClient = new PollyClient({\n\t\tregion,\n\t\tcredentials,\n\t\tcustomUserAgent: getAmplifyUserAgentObject({\n\t\t\tcategory: Category.Predictions,\n\t\t\taction: PredictionsAction.Convert,\n\t\t}),\n\t});\n\tconst synthesizeSpeechCommand = new SynthesizeSpeechCommand({\n\t\tOutputFormat: 'mp3',\n\t\tText: input.textToSpeech?.source?.text,\n\t\tVoiceId: voiceId as SynthesizeSpeechInput['VoiceId'],\n\t\tTextType: 'text',\n\t\tSampleRate: '24000',\n\t});\n\tconst data = await this.pollyClient.send(synthesizeSpeechCommand);\n\tconst response = new Response(data.AudioStream as ReadableStream);\n\tconst arrayBuffer = await response.arrayBuffer();\n\tconst blob = new Blob([arrayBuffer], {\n\t\ttype: data.ContentType,\n\t});\n\tconst url = URL.createObjectURL(blob);\n\n\treturn {\n\t\tspeech: { url },\n\t\taudioStream: arrayBuffer,\n\t\ttext: input.textToSpeech?.source?.text,\n\t} as TextToSpeechOutput;\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/aws-amplify/amplify-js/blob/9e01896b2f4346c10e980afe7bcd1d68207f7502/packages/predictions/src/providers/AmazonAIConvertPredictionsProvider.ts#L159-L213",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F191"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20applications%20using%20%40aws-sdk/client-polly%20to%20generate%20spoken%20audio%20from%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { PollyClient, SynthesizeSpeechCommand } from '@aws-sdk/client-polly';\n\nconst client = new PollyClient({ region: 'us-east-1' });\nconst result = await client.send(new SynthesizeSpeechCommand({\n  Text: 'Hello, world!', VoiceId: 'Joanna', OutputFormat: 'mp3'\n}));\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/@aws-sdk/client-polly@3.1172.0/dist-types/commands/SynthesizeSpeechCommand.d.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "javascript_polly_code_examples.html"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "microsoft-cognitiveservices-speech-sdk",
          "name": [
            {
              "t": "fact",
              "fact": "F194"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/microsoft/cognitive-services-speech-sdk-js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/microsoft-cognitiveservices-speech-sdk"
            },
            {
              "label": "Docs",
              "href": "https://github.com/microsoft/cognitive-services-speech-sdk-js/blob/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F201"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/microsoft/cognitive-services-speech-sdk-js/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F194"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F212"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Azure-Samples/cognitive-services-speech-sdk",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F211"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function () {\n        resultsDiv.innerHTML = \"\";\n        eventsDiv.innerHTML = \"\";\n        wordBoundaryList = [];\n        synthesisText = document.getElementById(\"synthesisText\");\n\n        // if we got an authorization token, use the token. Otherwise use the provided subscription key\n        var speechConfig;\n        if (subscriptionKey.value === \"\" || subscriptionKey.value === \"subscription\") {\n          alert(\"Please enter your Microsoft Cognitive Services Speech subscription key!\");\n          return;\n        }\n        speechConfig = SpeechSDK.SpeechConfig.fromSubscription(subscriptionKey.value, regionOptions.value);\n\n        speechConfig.speechSynthesisVoiceName = voiceOptions.value;\n        speechConfig.speechSynthesisOutputFormat = formatOptions.value;\n\n        player = new SpeechSDK.SpeakerAudioDestination();\n        player.onAudioStart = function(_) {\n          window.console.log(\"playback started\");\n          setTimeout(function(){ $(\"svg path :first-child\").each( function(i) {this.beginElement();}); }, 0.5);\n        }\n        player.onAudioEnd = function (_) {\n          window.console.log(\"playback finished\");\n          eventsDiv.innerHTML += \"playback finished\" + \"\\r\\n\";\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          pauseButton.disabled = true;\n          resumeButton.disabled = true;\n          wordBoundaryList = [];\n        };\n\n        var audioConfig  = SpeechSDK.AudioConfig.fromSpeakerOutput(player);\n\n        synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig, audioConfig);\n\n        // The event synthesizing signals that a synthesized audio chunk is received.\n        // You will receive one or more synthesizing events as a speech phrase is synthesized.\n        // You can use this callback to streaming receive the synthesized audio.\n        synthesizer.synthesizing = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(synthesizing) Reason: \" + SpeechSDK.ResultReason[e.result.reason] +\n                  \"Audio chunk length: \" + e.result.audioData.byteLength + \"\\r\\n\";\n        };\n\n        // The synthesis started event signals that the synthesis is started.\n        synthesizer.synthesisStarted = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(synthesis started)\" + \"\\r\\n\";\n          pauseButton.disabled = false;\n        };\n\n        // The event synthesis completed signals that the synthesis is completed.\n        synthesizer.synthesisCompleted = function (s, e) {\n          console.log(e);\n          eventsDiv.innerHTML += \"(synthesized)  Reason: \" + SpeechSDK.ResultReason[e.result.reason] +\n                  \" Audio length: \" + e.result.audioData.byteLength + \"\\r\\n\";\n        };\n\n        // The event signals that the service has stopped processing speech.\n        // This can happen when an error is encountered.\n        synthesizer.SynthesisCanceled = function (s, e) {\n          const cancellationDetails = SpeechSDK.CancellationDetails.fromResult(e.result);\n          let str = \"(cancel) Reason: \" + SpeechSDK.CancellationReason[cancellationDetails.reason];\n          if (cancellationDetails.reason === SpeechSDK.CancellationReason.Error) {\n            str += \": \" + e.result.errorDetails;\n          }\n          window.console.log(e);\n          eventsDiv.innerHTML += str + \"\\r\\n\";\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          pauseButton.disabled = true;\n          resumeButton.disabled = true;\n        };\n\n        // This event signals that word boundary is received. This indicates the audio boundary of each word.\n        // The unit of e.audioOffset is tick (1 tick = 100 nanoseconds), divide by 10,000 to convert to milliseconds.\n        synthesizer.wordBoundary = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(WordBoundary), Text: \" + e.text + \", Audio offset: \" + e.audioOffset / 10000 + \"ms.\" + \"\\r\\n\";\n          wordBoundaryList.push(e);\n        };\n\n        synthesizer.visemeReceived = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(Viseme), Audio offset: \" + e.audioOffset / 10000 + \"ms. Viseme ID: \" + e.visemeId + '\\n';\n          talkingHeadDiv.innerHTML = e.animation.replaceAll(\"begin=\\\"0.5s\\\"\", \"begin=\\\"indefinite\\\"\");\n          $(\"svg\").width('500px').height('500px');\n        }\n\n        synthesizer.bookmarkReached = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML +=  \"(Bookmark reached), Audio offset: \" + e.audioOffset / 10000 + \"ms. Bookmark text: \" + e.text + '\\n';\n        }\n\n        const complete_cb = function (result) {\n          if (result.reason === SpeechSDK.ResultReason.SynthesizingAudioCompleted) {\n            resultsDiv.innerHTML += \"synthesis finished\";\n          } else if (result.reason === SpeechSDK.ResultReason.Canceled) {\n            resultsDiv.innerHTML += \"synthesis failed. Error detail: \" + result.errorDetails;\n          }\n          window.console.log(result);\n          synthesizer.close();\n          synthesizer = undefined;\n        };\n        const err_cb = function (err) {\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          phraseDiv.innerHTML += err;\n          window.console.log(err);\n          synthesizer.close();\n          synthesizer = undefined;\n        };\n\n        if (!synthesisText.value) {\n          alert(\"Please enter synthesis content.\");\n          return;\n        }\n\n        startSynthesisAsyncButton.disabled = true;\n        downloadButton.disabled = true;\n\n        if (isSsml.checked) {\n          synthesizer.speakSsmlAsync(synthesisText.value,\n                  complete_cb,\n                  err_cb);\n        } else {\n          synthesizer.speakTextAsync(synthesisText.value,\n                  complete_cb,\n                  err_cb);\n        }\n      }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Azure-Samples/cognitive-services-speech-sdk/blob/528cbfad1c14d5a546e5e9bc5a34e6a84478db7e/samples/js/browser/synthesis.html#L320-L451",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F210"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=microsoft-cognitiveservices-speech-sdk%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F194"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import * as speech from 'microsoft-cognitiveservices-speech-sdk';\n\nconst config = speech.SpeechConfig.fromSubscription(\n  process.env.SPEECH_KEY, process.env.SPEECH_REGION\n);\nconst synthesizer = new speech.SpeechSynthesizer(config, null);\ntry {\n  const result = await new Promise((resolve, reject) => {\n    synthesizer.speakTextAsync('Hello, world!', resolve, reject);\n  });\n  console.log(result.audioData.byteLength);\n} finally {\n  synthesizer.close();\n}\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/microsoft-cognitiveservices-speech-sdk@1.53.0/distrib/lib/src/sdk/SpeechSynthesizer.d.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "SpeechSynthesizer.d.ts"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F199"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "cloud-text-to-speech",
          "name": [
            {
              "t": "fact",
              "fact": "F213"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/googleapis/google-cloud-node"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@google-cloud/text-to-speech"
            },
            {
              "label": "Docs",
              "href": "https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F63"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F214"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F220"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F215"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F64"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F228"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "async function synthesizeSsml(ssml, outputFile) {\n  // [START tts_synthesize_ssml]\n  const textToSpeech = require('@google-cloud/text-to-speech');\n  const fs = require('fs');\n  const util = require('util');\n\n  const client = new textToSpeech.TextToSpeechClient();\n\n  /**\n   * TODO(developer): Uncomment the following lines before running the sample.\n   */\n  // const ssml = '<speak>Hello there.</speak>';\n  // const outputFile = 'Local path to save audio file to, e.g. output.mp3';\n\n  const request = {\n    input: {ssml: ssml},\n    voice: {languageCode: 'en-US', ssmlGender: 'FEMALE'},\n    audioConfig: {audioEncoding: 'MP3'},\n  };\n\n  const [response] = await client.synthesizeSpeech(request);\n  const writeFile = util.promisify(fs.writeFile);\n  await writeFile(outputFile, response.audioContent, 'binary');\n  console.log(`Audio content written to file: ${outputFile}`);\n  // [END tts_synthesize_ssml]\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/GoogleCloudPlatform/nodejs-docs-samples/blob/7d399e2b93deac11a75e781b0525580d8a7cceec/texttospeech/synthesize.js#L42-L67",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F227"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20applications%20using%20%40google-cloud/text-to-speech%20to%20generate%20spoken%20audio%20from%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F213"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "const { TextToSpeechClient } = require('@google-cloud/text-to-speech');\n\n(async () => {\n  const client = new TextToSpeechClient();\n  const [result] = await client.synthesizeSpeech({\n    input: { text: 'Hello, world!' },\n    voice: { languageCode: 'en-US', ssmlGender: 'NEUTRAL' },\n    audioConfig: { audioEncoding: 'MP3' }\n  });\n})();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-texttospeech/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "quickstart.js"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F218"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "kokoro",
          "name": [
            {
              "t": "fact",
              "fact": "F230"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/hexgrad/kokoro"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/kokoro-js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/hexgrad/kokoro/blob/dfb907a02bba8152ca444717ca5d78747ccb4bec/kokoro.js/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F82"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F231"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F237"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F233"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F232"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/hexgrad/kokoro/blob/dfb907a02bba8152ca444717ca5d78747ccb4bec/kokoro.js/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F230"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F83"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F84"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F85"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F86"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F87"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F88"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F89"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F90"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/MartinDelophy/ai-video-editor",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F245"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export async function predictKokoroVoice(input, onProgress) {\n  const tts = await loadRuntime(onProgress);\n  onProgress?.({ backend: \"wasm\", progress: 92 });\n  // Let React paint the phase change before main-thread WASM inference starts.\n  // Otherwise the last download label remains visible throughout generation.\n  await new Promise((resolve) => {\n    if (globalThis.requestAnimationFrame) requestAnimationFrame(() => resolve());\n    else setTimeout(resolve, 0);\n  });\n\n  // kokoro-js currently hard-codes its upstream voice-style URL. Intercept\n  // only that one request so every runtime voice artifact comes from the\n  // owned, immutable provider mirrors while retaining kokoro-js's cache key.\n  const upstreamUrl = `${UPSTREAM_VOICE_PREFIX}${input.voiceId}.bin`;\n  const originalFetch = globalThis.fetch;\n  const mirroredFetch = (resource, init) => {\n    const requestUrl = typeof resource === \"string\" ? resource : resource?.url;\n    return requestUrl === upstreamUrl\n      ? fetchOwnedVoiceStyle(input.voiceId, originalFetch, init)\n      : originalFetch(resource, init);\n  };\n  globalThis.fetch = mirroredFetch;\n  try {\n    const audio = await tts.generate(input.text, { voice: input.voiceId, speed: input.speed });\n    return audio.toBlob();\n  } finally {\n    if (globalThis.fetch === mirroredFetch) globalThis.fetch = originalFetch;\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/MartinDelophy/ai-video-editor/blob/6348fec70e87de7a3a9217fb3e772ed4b3c4713e/src/lib/kokoroVoiceRuntime.js#L90-L118",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F244"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=JavaScript%20applications%20using%20kokoro-js%20to%20generate%20spoken%20audio%20from%20text&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F230"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { KokoroTTS } from 'kokoro-js';\n\nconst tts = await KokoroTTS.from_pretrained(\n  'onnx-community/Kokoro-82M-v1.0-ONNX', { dtype: 'q8', device: 'wasm' }\n);\nconst audio = await tts.generate('Hello, world!', { voice: 'af_heart' });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/hexgrad/kokoro/blob/dfb907a02bba8152ca444717ca5d78747ccb4bec/kokoro.js/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F235"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "cartesia-cartesia-js",
          "name": [
            {
              "t": "fact",
              "fact": "F247"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/cartesia-ai/cartesia-js"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/@cartesia/cartesia-js"
            },
            {
              "label": "Docs",
              "href": "https://github.com/cartesia-ai/cartesia-js/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F254"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F248"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F256"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F250"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F249"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/cartesia-ai/cartesia-js/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F247"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [],
          "cons": [],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/sonichi/sutando",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F264"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "export async function generateSpeech(\n\ttext: string,\n\toptions: { outputPath?: string; category?: string; label?: string } = {},\n): Promise<string> {\n\tif (!getCartesiaApiKey()) throw new Error('CARTESIA_API_KEY not set');\n\tif (!text.trim()) throw new Error('Empty text');\n\n\t// Organize: results/audio/{category}/{label}-{timestamp}.wav\n\tconst category = options.category || 'general';\n\tconst label = options.label || 'tts';\n\tconst outDir = join(getWorkspace(), 'results', 'audio', category);\n\tmkdirSync(outDir, { recursive: true });\n\tconst outPath = options.outputPath || join(outDir, `${label}-${Date.now()}.wav`);\n\n\tconst client = new Cartesia({ apiKey: getCartesiaApiKey() });\n\tconst ws = await client.tts.websocket();\n\ttry {\n\t\tconst ctx = ws.context({\n\t\t\tmodel_id: 'sonic-3',\n\t\t\tvoice: { mode: 'id', id: getCartesiaVoiceId() },\n\t\t\toutput_format: {\n\t\t\t\tcontainer: 'raw',\n\t\t\t\tencoding: 'pcm_s16le',\n\t\t\t\tsample_rate: SAMPLE_RATE,\n\t\t\t},\n\t\t});\n\n\t\t// Push text in sentence chunks for natural prosody\n\t\tconst sentences = splitSentences(text);\n\t\tfor (const s of sentences) {\n\t\t\tawait ctx.push({ transcript: s.trim() + ' ' });\n\t\t}\n\t\tawait ctx.no_more_inputs();\n\n\t\tconst chunks: Buffer[] = [];\n\t\tfor await (const event of ctx.receive()) {\n\t\t\tif (event.type === 'chunk' && event.audio) {\n\t\t\t\tchunks.push(Buffer.isBuffer(event.audio) ? event.audio : Buffer.from(event.audio));\n\t\t\t} else if (event.type === 'done') {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Write WAV with header\n\t\tconst pcm = Buffer.concat(chunks);\n\t\tconst header = createWavHeader(pcm.length, SAMPLE_RATE, CHANNELS, BIT_DEPTH);\n\t\twriteFileSync(outPath, Buffer.concat([header, pcm]));\n\t\treturn outPath;\n\t} finally {\n\t\tws.close();\n\t}\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/sonichi/sutando/blob/191a397a877c5e14dcd2ce13741a44e97d40c97d/src/cartesia-tts.ts#L58-L109",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F263"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=%40cartesia/cartesia-js%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F247"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import Cartesia from '@cartesia/cartesia-js';\n\nconst client = new Cartesia({ apiKey: process.env.CARTESIA_API_KEY });\nconst response = await client.tts.generate({\n  model_id: 'sonic-latest',\n  transcript: 'Hello, world!',\n  voice: 'f786b574-daa5-4673-aa0c-cbe3e8534c02',\n  output_format: { container: 'wav', encoding: 'pcm_f32le', sample_rate: 44100 }\n});\nconst audio = await response.blob();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/cartesia-ai/cartesia-js/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F252"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript text-to-speech library should I use?",
      "a": [
        {
          "t": "link",
          "href": "#elevenlabs",
          "label": [
            {
              "t": "text",
              "text": "ElevenLabs"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits apps that need streamed, expressive voices. "
        },
        {
          "t": "link",
          "href": "#amazon-polly",
          "label": [
            {
              "t": "text",
              "text": "Amazon Polly"
            }
          ]
        },
        {
          "t": "text",
          "text": " and "
        },
        {
          "t": "link",
          "href": "#cloud-text-to-speech",
          "label": [
            {
              "t": "text",
              "text": "Google Cloud Text-to-Speech"
            }
          ]
        },
        {
          "t": "text",
          "text": " suit apps that already run on those clouds and want SSML control. "
        },
        {
          "t": "link",
          "href": "#kokoro",
          "label": [
            {
              "t": "text",
              "text": "Kokoro"
            }
          ]
        },
        {
          "t": "text",
          "text": " suits apps that must synthesize speech locally."
        }
      ]
    },
    {
      "q": "What is Amazon Polly?",
      "a": [
        {
          "t": "link",
          "href": "#amazon-polly",
          "label": [
            {
              "t": "text",
              "text": "Amazon Polly"
            }
          ]
        },
        {
          "t": "text",
          "text": " is the AWS text-to-speech service. Its JavaScript client sends plain text or SSML and receives encoded speech or speech metadata."
        }
      ]
    },
    {
      "q": "What is Kokoro TTS?",
      "a": [
        {
          "t": "text",
          "text": "Kokoro is an open-weight text-to-speech model. "
        },
        {
          "t": "link",
          "href": "#kokoro",
          "label": [
            {
              "t": "text",
              "text": "kokoro-js"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs it locally through Transformers.js with voice selection and sentence-level streaming."
        }
      ]
    },
    {
      "q": "What are the alternatives to ElevenLabs?",
      "a": [
        {
          "t": "link",
          "href": "#amazon-polly",
          "label": [
            {
              "t": "text",
              "text": "Amazon Polly"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#cloud-text-to-speech",
          "label": [
            {
              "t": "text",
              "text": "Google Cloud Text-to-Speech"
            }
          ]
        },
        {
          "t": "text",
          "text": ", "
        },
        {
          "t": "link",
          "href": "#deepgram-sdk",
          "label": [
            {
              "t": "text",
              "text": "Deepgram"
            }
          ]
        },
        {
          "t": "text",
          "text": ", and "
        },
        {
          "t": "link",
          "href": "#cartesia-cartesia-js",
          "label": [
            {
              "t": "text",
              "text": "Cartesia"
            }
          ]
        },
        {
          "t": "text",
          "text": " offer hosted speech APIs with JavaScript SDKs. "
        },
        {
          "t": "link",
          "href": "#kokoro",
          "label": [
            {
              "t": "text",
              "text": "Kokoro"
            }
          ]
        },
        {
          "t": "text",
          "text": " runs speech synthesis locally with no API account."
        }
      ]
    },
    {
      "q": "How does Azure text to speech work in JavaScript?",
      "a": [
        {
          "t": "text",
          "text": "Azure text to speech runs through the "
        },
        {
          "t": "link",
          "href": "#microsoft-cognitiveservices-speech-sdk",
          "label": [
            {
              "t": "text",
              "text": "Microsoft Speech SDK"
            }
          ]
        },
        {
          "t": "text",
          "text": " for JavaScript. The same SDK also covers speech recognition."
        }
      ]
    },
    {
      "q": "How does OpenAI text to speech work in JavaScript?",
      "a": [
        {
          "t": "text",
          "text": "The "
        },
        {
          "t": "link",
          "href": "#openai",
          "label": [
            {
              "t": "text",
              "text": "OpenAI"
            }
          ]
        },
        {
          "t": "text",
          "text": " TypeScript library calls the OpenAI speech endpoint. The endpoint returns audio of the input text in a chosen voice."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, @elevenlabs/elevenlabs-js",
      "display": "ElevenLabs",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, @elevenlabs/elevenlabs-js",
      "display": "5.5M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, @elevenlabs/elevenlabs-js",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, @elevenlabs/elevenlabs-js",
      "display": "2.79.0",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, @elevenlabs/elevenlabs-js",
      "display": "v2.79.0",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, @elevenlabs/elevenlabs-js",
      "display": "454",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Audio streaming, @elevenlabs/elevenlabs-js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Voice listing, @elevenlabs/elevenlabs-js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Output formats, @elevenlabs/elevenlabs-js",
      "display": "MP3",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Install, @elevenlabs/elevenlabs-js",
      "display": "npm install @elevenlabs/elevenlabs-js",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "What it does, @elevenlabs/elevenlabs-js",
      "display": "Generates speech through ElevenLabs with streamed audio, voice selection, and surrounding-text context.",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "strengths lead, @elevenlabs/elevenlabs-js",
      "display": "Streams generated audio",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths, @elevenlabs/elevenlabs-js",
      "display": "Consume response audio while it arrives.",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths lead, @elevenlabs/elevenlabs-js",
      "display": "Connects neighboring speech clips",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths, @elevenlabs/elevenlabs-js",
      "display": "Supply preceding text to improve continuity between generated clips.",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "limitations lead, @elevenlabs/elevenlabs-js",
      "display": "Some formats need upgraded plans",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations, @elevenlabs/elevenlabs-js",
      "display": "Higher-bitrate MP3 and some WAV outputs require eligible subscription tiers.",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations lead, @elevenlabs/elevenlabs-js",
      "display": "Playback needs local media tools",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations, @elevenlabs/elevenlabs-js",
      "display": "Install MPV and ffmpeg when using the SDK’s play helper.",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "Quickstart, @elevenlabs/elevenlabs-js",
      "display": "import { ElevenLabsClient, play } from \"@elevenlabs/elevenlabs-js\";\n\nconst elevenlabs = new ElevenLabsClient({\n    apiKey: \"YOUR_API_KEY\", // Defaults to process.env.ELEVENLABS_API_KEY\n});\n\nconst audio = await elevenlabs.textToSpeech.convert(\"Xb7hH8MSUJpSbSDYk0k2\", {\n    text: \"Hello! 你好! Hola! नमस्ते! Bonjour! こんにちは! مرحبا! 안녕하세요! Ciao! Cześć! Привіт! வணக்கம்!\",\n    modelId: \"eleven_v4\",\n});\n\nawait play(audio);\n",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Project function, @elevenlabs/elevenlabs-js",
      "display": "async generateSpeech(\n    options: TTSOptions<ElevenLabsSpeechProviderOptions>,\n  ): Promise<TTSResult> {\n    const { logger } = options\n    logger.request(\n      `activity=generateSpeech provider=elevenlabs model=${this.model}`,\n      { provider: 'elevenlabs', model: this.model },\n    )\n    try {\n      const {\n        outputFormat,\n        voiceSettings,\n        languageCode,\n        seed,\n        previousText,\n        nextText,\n        previousRequestIds,\n        nextRequestIds,\n        applyTextNormalization,\n        applyLanguageTextNormalization,\n        optimizeStreamingLatency,\n        enableLogging,\n      } = options.modelOptions ?? {}\n      const effectiveOutputFormat =\n        outputFormat ?? inferOutputFormatFromResponseFormat(options.format)\n      const wrapAsWav = outputFormat == null && options.format === 'wav'\n      const { format, contentType } = wrapAsWav\n        ? { format: 'wav', contentType: 'audio/wav' }\n        : parseOutputFormat(effectiveOutputFormat)\n      const requestOptions = options.abortSignal\n        ? { abortSignal: options.abortSignal }\n        : {}\n      // `format: 'wav'` asks ElevenLabs for pcm_44100 and wraps it here, on\n      // every endpoint: the byte-stream pair hands back raw bytes, the\n      // timestamped pair hands back the same bytes as base64.\n      const encodeAudio = (buffer: ArrayBuffer) =>\n        arrayBufferToBase64(wrapAsWav ? wrapPcmAsWav(buffer) : buffer)\n      const encodeAudioBase64 = (audioBase64: string) =>\n        wrapAsWav ? encodeAudio(base64ToArrayBuffer(audioBase64)) : audioBase64\n      const base = {\n        modelId: this.model,\n        ...(effectiveOutputFormat\n          ? { outputFormat: effectiveOutputFormat }\n          : {}),\n        ...(languageCode ? { languageCode } : {}),\n        ...(seed != null ? { seed } : {}),\n        ...(applyTextNormalization ? { applyTextNormalization } : {}),\n      }\n\n      // Four endpoints, picked by (turns?, timestamps?). The dialogue pair\n      // takes `inputs` instead of a voice id in the path, and the timestamped\n      // pair returns JSON (base64 audio + alignment) instead of a byte stream.\n      if (options.turns) {\n        const inputs = options.turns.map((turn) => ({\n          text: turn.text,\n          voiceId: turn.voice,\n        }))\n        const dialogue = {\n          ...base,\n          inputs,\n          ...(voiceSettings?.stability != null\n            ? { settings: { stability: voiceSettings.stability } }\n            : {}),\n        }\n\n        if (options.timestamps) {\n          const response =\n            await this.client.textToDialogue.convertWithTimestamps(\n              dialogue,\n              requestOptions,\n            )\n          return {\n            id: generateId(this.name),\n            model: this.model,\n            audio: encodeAudioBase64(response.audioBase64),\n            format,\n            contentType,\n            ...toAlignmentFields(response.alignment, response.voiceSegments),\n          }\n        }\n\n        const stream = await this.client.textToDialogue.convert(\n          dialogue,\n          requestOptions,\n        )\n        return {\n          id: generateId(this.name),\n          model: this.model,\n          audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n          format,\n          contentType,\n        }\n      }\n\n      const voiceId = options.voice ?? options.modelOptions?.voiceId\n      if (!voiceId) {\n        throw new Error(\n          'ElevenLabs TTS requires a voice. Pass `voice` on generateSpeech() or `voiceId` in modelOptions.',\n        )\n      }\n      const single = {\n        ...base,\n        text: options.text,\n        ...(voiceSettings\n          ? { voiceSettings: mapVoiceSettings(voiceSettings, options.speed) }\n          : options.speed != null\n            ? { voiceSettings: { speed: options.speed } }\n            : {}),\n        ...(previousText ? { previousText } : {}),\n        ...(nextText ? { nextText } : {}),\n        ...(previousRequestIds ? { previousRequestIds } : {}),\n        ...(nextRequestIds ? { nextRequestIds } : {}),\n        ...(applyLanguageTextNormalization != null\n          ? { applyLanguageTextNormalization }\n          : {}),\n        ...(enableLogging != null ? { enableLogging } : {}),\n      }\n\n      if (options.timestamps) {\n        const response = await this.client.textToSpeech.convertWithTimestamps(\n          voiceId,\n          single,\n          requestOptions,\n        )\n        return {\n          id: generateId(this.name),\n          model: this.model,\n          audio: encodeAudioBase64(response.audioBase64),\n          format,\n          contentType,\n          ...toAlignmentFields(response.alignment, undefined),\n        }\n      }\n\n      const stream = await this.client.textToSpeech.convert(\n        voiceId,\n        {\n          ...single,\n          ...(optimizeStreamingLatency != null\n            ? { optimizeStreamingLatency }\n            : {}),\n        },\n        requestOptions,\n      )\n\n      return {\n        id: generateId(this.name),\n        model: this.model,\n        audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n        format,\n        contentType,\n      }\n    } catch (error) {\n      logger.errors('elevenlabs.generateSpeech fatal', {\n        error,\n        source: 'elevenlabs.generateSpeech',\n      })\n      throw error\n    }\n  }\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function reference, @elevenlabs/elevenlabs-js",
      "display": "speech.ts · generateSpeech()",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project repository, @elevenlabs/elevenlabs-js",
      "display": "TanStack/ai",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project stars, TanStack/ai",
      "display": "3.4K",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project push date, TanStack/ai",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Library name, @aws-sdk/client-polly",
      "display": "Amazon Polly",
      "asOf": "2026-11-17"
    },
    "F27": {
      "label": "Monthly downloads, @aws-sdk/client-polly",
      "display": "3.6M",
      "asOf": "2026-11-15"
    },
    "F28": {
      "label": "License, @aws-sdk/client-polly",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F29": {
      "label": "Package release, @aws-sdk/client-polly",
      "display": "3.1170.0",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Undated package release, @aws-sdk/client-polly",
      "display": "v3.1170.0",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Repository stars, @aws-sdk/client-polly",
      "display": "3.7K",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "SSML input, @aws-sdk/client-polly",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "Audio streaming, @aws-sdk/client-polly",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Voice listing, @aws-sdk/client-polly",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Output formats, @aws-sdk/client-polly",
      "display": "MP3",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Install, @aws-sdk/client-polly",
      "display": "npm install @aws-sdk/client-polly",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "What it does, @aws-sdk/client-polly",
      "display": "Sends plain text or SSML to Amazon Polly and receives encoded speech or speech metadata.",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "strengths lead, @aws-sdk/client-polly",
      "display": "Accepts marked-up speech input",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths, @aws-sdk/client-polly",
      "display": "Send plain text or SSML to control synthesis.",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths lead, @aws-sdk/client-polly",
      "display": "Returns word timing metadata",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths, @aws-sdk/client-polly",
      "display": "Request speech marks to locate words and sentences in generated audio.",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "limitations lead, @aws-sdk/client-polly",
      "display": "Timing metadata replaces audio",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations, @aws-sdk/client-polly",
      "display": "Request synthesized audio separately when speech marks are also needed.",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations lead, @aws-sdk/client-polly",
      "display": "SSML support varies by voice",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations, @aws-sdk/client-polly",
      "display": "Check tag availability before switching synthesis voices.",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "Quickstart, @aws-sdk/client-polly",
      "display": "import { PollyClient, SynthesizeSpeechCommand } from \"@aws-sdk/client-polly\";\nimport { S3Client } from \"@aws-sdk/client-s3\";\nimport { Upload } from \"@aws-sdk/lib-storage\";\n\n/**\n * Synthesize an audio file from text.\n *\n * @param {{ bucket: string, translated_text: string, object: string}} sourceDestinationConfig\n */\nexport const handler = async (sourceDestinationConfig) => {\n const pollyClient = new PollyClient({});\n\n const synthesizeSpeechCommand = new SynthesizeSpeechCommand({\n Engine: \"neural\",\n Text: sourceDestinationConfig.translated_text,\n VoiceId: \"Ruth\",\n OutputFormat: \"mp3\",\n });\n\n const { AudioStream } = await pollyClient.send(synthesizeSpeechCommand);\n\n const audioKey = `${sourceDestinationConfig.object}.mp3`;\n\n // Store the audio file in S3.\n const s3Client = new S3Client();\n const upload = new Upload({\n client: s3Client,\n params: {\n Bucket: sourceDestinationConfig.bucket,\n Key: audioKey,\n Body: AudioStream,\n ContentType: \"audio/mp3\",\n },\n });\n\n await upload.done();\n return audioKey;\n};\n",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Project function, @aws-sdk/client-polly",
      "display": "protected async convertTextToSpeech(\n\t\tinput: TextToSpeechInput,\n\t): Promise<TextToSpeechOutput> {\n\t\tconst { credentials } = await this._resolveCtx().fetchAuthSession();\n\t\tassertValidationError(\n\t\t\t!!credentials,\n\t\t\tPredictionsValidationErrorCode.NoCredentials,\n\t\t);\n\t\tassertValidationError(\n\t\t\t!!input.textToSpeech?.source,\n\t\t\tPredictionsValidationErrorCode.NoSource,\n\t\t);\n\n\t\tconst { speechGenerator } =\n\t\t\tthis._resolveCtx().resourcesConfig.Predictions?.convert ?? {};\n\t\tassertValidationError(\n\t\t\t!!speechGenerator?.region,\n\t\t\tPredictionsValidationErrorCode.NoRegion,\n\t\t);\n\n\t\tconst { defaults = {}, region } = speechGenerator;\n\n\t\tconst { voiceId: defaultVoiceId } = defaults;\n\t\tconst voiceId = input.textToSpeech?.voiceId ?? defaultVoiceId;\n\t\tassertValidationError(!!voiceId, PredictionsValidationErrorCode.NoVoiceId);\n\n\t\tthis.pollyClient = new PollyClient({\n\t\t\tregion,\n\t\t\tcredentials,\n\t\t\tcustomUserAgent: getAmplifyUserAgentObject({\n\t\t\t\tcategory: Category.Predictions,\n\t\t\t\taction: PredictionsAction.Convert,\n\t\t\t}),\n\t\t});\n\t\tconst synthesizeSpeechCommand = new SynthesizeSpeechCommand({\n\t\t\tOutputFormat: 'mp3',\n\t\t\tText: input.textToSpeech?.source?.text,\n\t\t\tVoiceId: voiceId as SynthesizeSpeechInput['VoiceId'],\n\t\t\tTextType: 'text',\n\t\t\tSampleRate: '24000',\n\t\t});\n\t\tconst data = await this.pollyClient.send(synthesizeSpeechCommand);\n\t\tconst response = new Response(data.AudioStream as ReadableStream);\n\t\tconst arrayBuffer = await response.arrayBuffer();\n\t\tconst blob = new Blob([arrayBuffer], {\n\t\t\ttype: data.ContentType,\n\t\t});\n\t\tconst url = URL.createObjectURL(blob);\n\n\t\treturn {\n\t\t\tspeech: { url },\n\t\t\taudioStream: arrayBuffer,\n\t\t\ttext: input.textToSpeech?.source?.text,\n\t\t} as TextToSpeechOutput;\n\t}\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function reference, @aws-sdk/client-polly",
      "display": "AmazonAIConvertPredictionsProvider.ts · convertTextToSpeech()",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project repository, @aws-sdk/client-polly",
      "display": "aws-amplify/amplify-js",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project stars, aws-amplify/amplify-js",
      "display": "9.6K",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project push date, aws-amplify/amplify-js",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F52": {
      "label": "Library name, @google-cloud/text-to-speech",
      "display": "Cloud Text-to-Speech",
      "asOf": "2026-11-17"
    },
    "F53": {
      "label": "Monthly downloads, @google-cloud/text-to-speech",
      "display": "1.7M",
      "asOf": "2026-11-15"
    },
    "F54": {
      "label": "License, @google-cloud/text-to-speech",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F55": {
      "label": "Package release, @google-cloud/text-to-speech",
      "display": "7.2.0",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Undated package release, @google-cloud/text-to-speech",
      "display": "v7.2.0",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Repository stars, @google-cloud/text-to-speech",
      "display": "3.2K",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "SSML input, @google-cloud/text-to-speech",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "Audio streaming, @google-cloud/text-to-speech",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Voice listing, @google-cloud/text-to-speech",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Output formats, @google-cloud/text-to-speech",
      "display": "MP3",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Install, @google-cloud/text-to-speech",
      "display": "npm install @google-cloud/text-to-speech",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "What it does, @google-cloud/text-to-speech",
      "display": "Synthesizes speech through Google Cloud, with SSML controls and compatible bidirectional streaming voices.",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "strengths lead, @google-cloud/text-to-speech",
      "display": "Controls pauses through SSML",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths, @google-cloud/text-to-speech",
      "display": "Mark pauses and spoken formatting in the synthesis request.",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths lead, @google-cloud/text-to-speech",
      "display": "Receives audio while sending text",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths, @google-cloud/text-to-speech",
      "display": "Bidirectional streaming accepts more text before the full input is ready.",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "limitations lead, @google-cloud/text-to-speech",
      "display": "Streaming needs compatible voices",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations, @google-cloud/text-to-speech",
      "display": "Use Chirp 3: HD voices for bidirectional streaming.",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations lead, @google-cloud/text-to-speech",
      "display": "Requests allow 5,000 input bytes",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations, @google-cloud/text-to-speech",
      "display": "Split longer input; some characters require multiple bytes.",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "Quickstart, @google-cloud/text-to-speech",
      "display": "// Copyright 2026 Google LLC\n//\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n//      http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\n'use strict';\n\nfunction main() {\n  // [START tts_quickstart]\n  // Imports the Google Cloud client library\n  const textToSpeech = require('@google-cloud/text-to-speech');\n\n  // Import other required libraries\n  const fs = require('fs');\n  const util = require('util');\n  // Creates a client\n  const client = new textToSpeech.TextToSpeechClient();\n  async function quickStart() {\n    // The text to synthesize\n    const text = 'hello, world!';\n\n    // Construct the request\n    const request = {\n      input: {text: text},\n      // Select the language and SSML voice gender (optional)\n      voice: {languageCode: 'en-US', ssmlGender: 'NEUTRAL'},\n      // select the type of audio encoding\n      audioConfig: {audioEncoding: 'MP3'},\n    };\n\n    // Performs the text-to-speech request\n    const [response] = await client.synthesizeSpeech(request);\n    // Write the binary audio content to a local file\n    const writeFile = util.promisify(fs.writeFile);\n    await writeFile('output.mp3', response.audioContent, 'binary');\n    console.log('Audio content written to file: output.mp3');\n  }\n  quickStart();\n  // [END tts_quickstart]\n}\n\nmain(...process.argv.slice(2));\n",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Library name, kokoro-js",
      "display": "Kokoro",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Monthly downloads, kokoro-js",
      "display": "890.9K",
      "asOf": "2026-11-15"
    },
    "F75": {
      "label": "License, kokoro-js",
      "display": "Apache-2.0",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Package release, kokoro-js",
      "display": "1.2.1",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Undated package release, kokoro-js",
      "display": "v1.2.1",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Repository stars, kokoro-js",
      "display": "10.2K",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Audio streaming, kokoro-js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Voice listing, kokoro-js",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F81": {
      "label": "Install, kokoro-js",
      "display": "npm install kokoro-js",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "What it does, kokoro-js",
      "display": "Runs speech synthesis locally through Transformers.js, with voice selection and sentence-level streaming.",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "strengths lead, kokoro-js",
      "display": "Runs locally in the browser",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "strengths, kokoro-js",
      "display": "Synthesize speech locally after the required model assets load.",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "strengths lead, kokoro-js",
      "display": "Accepts text incrementally",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "strengths, kokoro-js",
      "display": "Push new text through TextSplitterStream as it becomes available.",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "limitations lead, kokoro-js",
      "display": "Long chunks are truncated",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "limitations, kokoro-js",
      "display": "Split long input into smaller chunks before synthesis.",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "limitations lead, kokoro-js",
      "display": "Needs model assets before synthesis",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "limitations, kokoro-js",
      "display": "Load the selected model before generating speech.",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "Quickstart, kokoro-js",
      "display": "import { KokoroTTS } from \"kokoro-js\";\n\nconst model_id = \"onnx-community/Kokoro-82M-v1.0-ONNX\";\nconst tts = await KokoroTTS.from_pretrained(model_id, {\n  dtype: \"q8\", // Options: \"fp32\", \"fp16\", \"q8\", \"q4\", \"q4f16\"\n  device: \"wasm\", // Options: \"wasm\", \"webgpu\" (web) or \"cpu\" (node). If using \"webgpu\", we recommend using dtype=\"fp32\".\n});\n\nconst text = \"Life is like a box of chocolates. You never know what you're gonna get.\";\nconst audio = await tts.generate(text, {\n  // Use `tts.list_voices()` to list all available voices\n  voice: \"af_heart\",\n});\naudio.save(\"audio.wav\");\n",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "Project function, kokoro-js",
      "display": "export async function predictKokoroVoice(input, onProgress) {\n  const tts = await loadRuntime(onProgress);\n  onProgress?.({ backend: \"wasm\", progress: 92 });\n  // Let React paint the phase change before main-thread WASM inference starts.\n  // Otherwise the last download label remains visible throughout generation.\n  await new Promise((resolve) => {\n    if (globalThis.requestAnimationFrame) requestAnimationFrame(() => resolve());\n    else setTimeout(resolve, 0);\n  });\n\n  // kokoro-js currently hard-codes its upstream voice-style URL. Intercept\n  // only that one request so every runtime voice artifact comes from the\n  // owned, immutable provider mirrors while retaining kokoro-js's cache key.\n  const upstreamUrl = `${UPSTREAM_VOICE_PREFIX}${input.voiceId}.bin`;\n  const originalFetch = globalThis.fetch;\n  const mirroredFetch = (resource, init) => {\n    const requestUrl = typeof resource === \"string\" ? resource : resource?.url;\n    return requestUrl === upstreamUrl\n      ? fetchOwnedVoiceStyle(input.voiceId, originalFetch, init)\n      : originalFetch(resource, init);\n  };\n  globalThis.fetch = mirroredFetch;\n  try {\n    const audio = await tts.generate(input.text, { voice: input.voiceId, speed: input.speed });\n    return audio.toBlob();\n  } finally {\n    if (globalThis.fetch === mirroredFetch) globalThis.fetch = originalFetch;\n  }\n}\n",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "Project function reference, kokoro-js",
      "display": "kokoroVoiceRuntime.js · predictKokoroVoice()",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "Project repository, kokoro-js",
      "display": "MartinDelophy/ai-video-editor",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "Project stars, MartinDelophy/ai-video-editor",
      "display": "987",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "Project push date, MartinDelophy/ai-video-editor",
      "display": "Nov 2026",
      "asOf": "2026-11-14"
    },
    "F97": {
      "label": "Developer need",
      "display": "Sending and receiving speech incrementally",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "Why choose @google-cloud/text-to-speech",
      "display": "bidirectional text and audio streaming",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "Developer need in introduction",
      "display": "sending and receiving speech incrementally",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "When to consider kokoro-js",
      "display": "local browser inference is required",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Developer need",
      "display": "Synchronizing speech with word timing",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Why choose @aws-sdk/client-polly",
      "display": "separate speech-mark metadata",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Developer need in introduction",
      "display": "synchronizing speech with word timing",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "When to consider @google-cloud/text-to-speech",
      "display": "text and audio must flow simultaneously",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Developer need",
      "display": "Connecting generated speech clips",
      "asOf": "2026-11-17"
    },
    "F106": {
      "label": "Why choose @elevenlabs/elevenlabs-js",
      "display": "preceding-text continuity controls",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Developer need in introduction",
      "display": "connecting generated speech clips",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "When to consider kokoro-js",
      "display": "local synthesis is required",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "Developer need",
      "display": "Generating speech locally in a browser",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Why choose kokoro-js",
      "display": "local model inference",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Developer need in introduction",
      "display": "generating speech locally in a browser",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "When to consider @google-cloud/text-to-speech",
      "display": "SSML controls are required",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "Page introduction",
      "display": "JavaScript text-to-speech libraries let application developers turn text into speech audio.",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "FAQ: Can Google start synthesis before all text is sent?",
      "display": "Bidirectional streaming sends text and receives audio simultaneously.",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "FAQ: Can every Google voice use bidirectional streaming?",
      "display": "Streaming synthesis is compatible only with Chirp 3: HD voices.",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "FAQ: Can Google content limits be raised?",
      "display": "Content limits cannot be increased, unlike request quotas.",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "FAQ: Does Polly return speech marks together with speech?",
      "display": "A speech-mark request returns metadata instead of synthesized audio.",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "FAQ: Can Polly list voices for a selected language?",
      "display": "DescribeVoices accepts a language code to filter available synthesis voices.",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "FAQ: Does Polly accept SSML?",
      "display": "SynthesizeSpeech accepts plain text or well-formed SSML.",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "FAQ: Can ElevenLabs use preceding text for continuity?",
      "display": "previous_text helps improve continuity when concatenating multiple generated clips.",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "FAQ: Is ElevenLabs generation deterministic?",
      "display": "A fixed seed does not guarantee deterministic generation.",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "FAQ: Does ElevenLabs playback require extra tools?",
      "display": "The SDK playback helper requires MPV and ffmpeg.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Can Kokoro run speech synthesis in the browser?",
      "display": "Kokoro.js runs the model locally in the browser through Transformers.js.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: What happens to exceptionally long Kokoro chunks?",
      "display": "The current generation implementation truncates exceptionally long chunks.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: How does a Kokoro text stream finish?",
      "display": "Close TextSplitterStream after the final text input to signal completion.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "Library name, openai",
      "display": "openai",
      "asOf": "2026-11-20"
    },
    "F127": {
      "label": "Monthly downloads, openai",
      "display": "223.6M",
      "asOf": "2026-11-20"
    },
    "F128": {
      "label": "License, openai",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F129": {
      "label": "Package release, openai",
      "display": "7.60.0",
      "asOf": "2026-11-20"
    },
    "F130": {
      "label": "Package release date, openai",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F131": {
      "label": "Install, openai",
      "display": "npm install openai",
      "asOf": "2026-11-20"
    },
    "F132": {
      "label": "Quickstart, openai",
      "display": "import OpenAI from 'openai';\n\nconst client = new OpenAI();\nconst audio = await client.audio.speech.create({\n  model: 'gpt-4o-mini-tts', voice: 'alloy', input: 'Hello, world!'\n});\nconst bytes = await audio.arrayBuffer();\n",
      "asOf": "2026-11-20"
    },
    "F133": {
      "label": "Official description, openai",
      "display": "Provides the official TypeScript client for the OpenAI API.",
      "asOf": "2026-11-20"
    },
    "F134": {
      "label": "Quickstart source file, openai",
      "display": "resources/audio/speech.d.ts",
      "asOf": "2026-11-20"
    },
    "F135": {
      "label": "Repository stars, openai",
      "display": "11.3K",
      "asOf": "2026-11-20"
    },
    "F136": {
      "label": "Native text streaming, openai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F137": {
      "label": "In-process synthesis, openai",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Native speech role, openai",
      "display": "Dedicated audio.speech surface in a broader API SDK; text/model/voice and optional model-specific instructions produce audio bytes.",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "Setup and host requirements, openai",
      "display": "Server ES module with supported Node/fetch runtime, OPENAI_API_KEY configured, and access to the selected speech model/voice. Response is audio bytes; this first call does not imply local inference or playback. Service request was not run.",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Speech controls, openai",
      "display": "Speech request supports model/voice/input, response encoding, speed, and model-specific natural-language instructions. The complete text is supplied per create request.",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Project function, openai",
      "display": "async ttsBuffer(textInput) {\n  try {\n    const result = await this.openai.audio.speech.create({\n      model: \"tts-1\",\n      voice: this.voice,\n      input: textInput,\n    });\n    return Buffer.from(await result.arrayBuffer());\n  } catch (e) {\n    console.error(e);\n  }\n  return null;\n}\n",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Project source file, openai",
      "display": "server/utils/TextToSpeech/openAi/index.js",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Project full_name, openai",
      "display": "Mintplex-Labs/anything-llm",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Project stargazers_count, openai",
      "display": "68.4K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Library name, @elevenlabs/elevenlabs-js",
      "display": "@elevenlabs/elevenlabs-js",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Monthly downloads, @elevenlabs/elevenlabs-js",
      "display": "5.7M",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "License, @elevenlabs/elevenlabs-js",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "Package release, @elevenlabs/elevenlabs-js",
      "display": "2.79.0",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Package release date, @elevenlabs/elevenlabs-js",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Install, @elevenlabs/elevenlabs-js",
      "display": "npm install @elevenlabs/elevenlabs-js",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Quickstart, @elevenlabs/elevenlabs-js",
      "display": "import { ElevenLabsClient } from '@elevenlabs/elevenlabs-js';\n\nconst client = new ElevenLabsClient();\nconst audio = await client.textToSpeech.convert('JBFqnCBsd6RMkjVDRZzb', {\n  text: 'Hello, world!'\n});\n",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Repository stars, @elevenlabs/elevenlabs-js",
      "display": "454",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Native text streaming, @elevenlabs/elevenlabs-js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "In-process synthesis, @elevenlabs/elevenlabs-js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "Native speech role, @elevenlabs/elevenlabs-js",
      "display": "Speech/dialogue HTTP client with voice/settings/context controls and optional character alignment/voice segments.",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Setup and host requirements, @elevenlabs/elevenlabs-js",
      "display": "Supported server runtime, ELEVENLABS_API_KEY configured, authorized chosen voice ID/model, and a consumer for the returned audio stream. The documented voice literal is a starter choice, not access guaranteed for every account. No playback helper, OS audio tool, or logging setup required.",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Alignment representation, @elevenlabs/elevenlabs-js",
      "display": "Timestamped endpoints return Base64 audio plus optional character arrays/times; dialogue additionally returns voice/time/character-index segments with exclusive end index. Host WAV wrapping remains application code.",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Project function, @elevenlabs/elevenlabs-js",
      "display": "async generateSpeech(\n  options: TTSOptions<ElevenLabsSpeechProviderOptions>,\n): Promise<TTSResult> {\n  const { logger } = options\n  logger.request(\n    `activity=generateSpeech provider=elevenlabs model=${this.model}`,\n    { provider: 'elevenlabs', model: this.model },\n  )\n  try {\n    const {\n      outputFormat,\n      voiceSettings,\n      languageCode,\n      seed,\n      previousText,\n      nextText,\n      previousRequestIds,\n      nextRequestIds,\n      applyTextNormalization,\n      applyLanguageTextNormalization,\n      optimizeStreamingLatency,\n      enableLogging,\n    } = options.modelOptions ?? {}\n    const effectiveOutputFormat =\n      outputFormat ?? inferOutputFormatFromResponseFormat(options.format)\n    const wrapAsWav = outputFormat == null && options.format === 'wav'\n    const { format, contentType } = wrapAsWav\n      ? { format: 'wav', contentType: 'audio/wav' }\n      : parseOutputFormat(effectiveOutputFormat)\n    const requestOptions = options.abortSignal\n      ? { abortSignal: options.abortSignal }\n      : {}\n    // `format: 'wav'` asks ElevenLabs for pcm_44100 and wraps it here, on\n    // every endpoint: the byte-stream pair hands back raw bytes, the\n    // timestamped pair hands back the same bytes as base64.\n    const encodeAudio = (buffer: ArrayBuffer) =>\n      arrayBufferToBase64(wrapAsWav ? wrapPcmAsWav(buffer) : buffer)\n    const encodeAudioBase64 = (audioBase64: string) =>\n      wrapAsWav ? encodeAudio(base64ToArrayBuffer(audioBase64)) : audioBase64\n    const base = {\n      modelId: this.model,\n      ...(effectiveOutputFormat\n        ? { outputFormat: effectiveOutputFormat }\n        : {}),\n      ...(languageCode ? { languageCode } : {}),\n      ...(seed != null ? { seed } : {}),\n      ...(applyTextNormalization ? { applyTextNormalization } : {}),\n    }\n\n    // Four endpoints, picked by (turns?, timestamps?). The dialogue pair\n    // takes `inputs` instead of a voice id in the path, and the timestamped\n    // pair returns JSON (base64 audio + alignment) instead of a byte stream.\n    if (options.turns) {\n      const inputs = options.turns.map((turn) => ({\n        text: turn.text,\n        voiceId: turn.voice,\n      }))\n      const dialogue = {\n        ...base,\n        inputs,\n        ...(voiceSettings?.stability != null\n          ? { settings: { stability: voiceSettings.stability } }\n          : {}),\n      }\n\n      if (options.timestamps) {\n        const response =\n          await this.client.textToDialogue.convertWithTimestamps(\n            dialogue,\n            requestOptions,\n          )\n        return {\n          id: generateId(this.name),\n          model: this.model,\n          audio: encodeAudioBase64(response.audioBase64),\n          format,\n          contentType,\n          ...toAlignmentFields(response.alignment, response.voiceSegments),\n        }\n      }\n\n      const stream = await this.client.textToDialogue.convert(\n        dialogue,\n        requestOptions,\n      )\n      return {\n        id: generateId(this.name),\n        model: this.model,\n        audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n        format,\n        contentType,\n      }\n    }\n\n    const voiceId = options.voice ?? options.modelOptions?.voiceId\n    if (!voiceId) {\n      throw new Error(\n        'ElevenLabs TTS requires a voice. Pass `voice` on generateSpeech() or `voiceId` in modelOptions.',\n      )\n    }\n    const single = {\n      ...base,\n      text: options.text,\n      ...(voiceSettings\n        ? { voiceSettings: mapVoiceSettings(voiceSettings, options.speed) }\n        : options.speed != null\n          ? { voiceSettings: { speed: options.speed } }\n          : {}),\n      ...(previousText ? { previousText } : {}),\n      ...(nextText ? { nextText } : {}),\n      ...(previousRequestIds ? { previousRequestIds } : {}),\n      ...(nextRequestIds ? { nextRequestIds } : {}),\n      ...(applyLanguageTextNormalization != null\n        ? { applyLanguageTextNormalization }\n        : {}),\n      ...(enableLogging != null ? { enableLogging } : {}),\n    }\n\n    if (options.timestamps) {\n      const response = await this.client.textToSpeech.convertWithTimestamps(\n        voiceId,\n        single,\n        requestOptions,\n      )\n      return {\n        id: generateId(this.name),\n        model: this.model,\n        audio: encodeAudioBase64(response.audioBase64),\n        format,\n        contentType,\n        ...toAlignmentFields(response.alignment, undefined),\n      }\n    }\n\n    const stream = await this.client.textToSpeech.convert(\n      voiceId,\n      {\n        ...single,\n        ...(optimizeStreamingLatency != null\n          ? { optimizeStreamingLatency }\n          : {}),\n      },\n      requestOptions,\n    )\n\n    return {\n      id: generateId(this.name),\n      model: this.model,\n      audio: encodeAudio(await readStreamToArrayBuffer(stream)),\n      format,\n      contentType,\n    }\n  } catch (error) {\n    logger.errors('elevenlabs.generateSpeech fatal', {\n      error,\n      source: 'elevenlabs.generateSpeech',\n    })\n    throw error\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Project source file, @elevenlabs/elevenlabs-js",
      "display": "packages/ai-elevenlabs/src/adapters/speech.ts",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Project full_name, @elevenlabs/elevenlabs-js",
      "display": "TanStack/ai",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Project stargazers_count, @elevenlabs/elevenlabs-js",
      "display": "3.4K",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Library name, @deepgram/sdk",
      "display": "@deepgram/sdk",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Monthly downloads, @deepgram/sdk",
      "display": "5.3M",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "License, @deepgram/sdk",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Package release, @deepgram/sdk",
      "display": "5.20.0",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Package release date, @deepgram/sdk",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "Install, @deepgram/sdk",
      "display": "npm install @deepgram/sdk",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Quickstart, @deepgram/sdk",
      "display": "import { DeepgramClient } from '@deepgram/sdk';\n\nconst client = new DeepgramClient();\nconst audio = await client.speak.v1.audio.generate({\n  text: 'Hello, world!', model: 'aura-2-thalia-en'\n});\n",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Official description, @deepgram/sdk",
      "display": "Provides the official SDK for the Deepgram speech recognition, text-to-speech, and language understanding APIs.",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Quickstart source file, @deepgram/sdk",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Repository stars, @deepgram/sdk",
      "display": "286",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Native text streaming, @deepgram/sdk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "In-process synthesis, @deepgram/sdk",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Native speech role, @deepgram/sdk",
      "display": "Versioned speech SDK with HTTP audio generation and native start-closed WebSocket text/flush/clear/close controls.",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Setup and host requirements, @deepgram/sdk",
      "display": "Supported Node/runtime and DEEPGRAM_API_KEY configured. Current5 client is DeepgramClient; createClient and old speak.request examples are not silently renamed. This is full-text HTTP generation; text-streaming WebSocket setup is a separate native surface.",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "Migration and stream lifecycle, @deepgram/sdk",
      "display": "Version5 replaces createClient with DeepgramClient and versioned method namespaces. Streaming sockets start closed: register handlers, connect, waitForOpen, then send text/flush/clear/close.",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Library name, @aws-sdk/client-polly",
      "display": "@aws-sdk/client-polly",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Monthly downloads, @aws-sdk/client-polly",
      "display": "3.7M",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "License, @aws-sdk/client-polly",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release, @aws-sdk/client-polly",
      "display": "3.1172.0",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Package release date, @aws-sdk/client-polly",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Install, @aws-sdk/client-polly",
      "display": "npm install @aws-sdk/client-polly",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart, @aws-sdk/client-polly",
      "display": "import { PollyClient, SynthesizeSpeechCommand } from '@aws-sdk/client-polly';\n\nconst client = new PollyClient({ region: 'us-east-1' });\nconst result = await client.send(new SynthesizeSpeechCommand({\n  Text: 'Hello, world!', VoiceId: 'Joanna', OutputFormat: 'mp3'\n}));\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Repository stars, @aws-sdk/client-polly",
      "display": "3.7K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Native text streaming, @aws-sdk/client-polly",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "In-process synthesis, @aws-sdk/client-polly",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Native speech role, @aws-sdk/client-polly",
      "display": "Polly service client with explicit synthesis command input, output formats, voices, and speech-mark metadata.",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "Setup and host requirements, @aws-sdk/client-polly",
      "display": "Supported Node/browser runtime, AWS credentials/IAM and chosen region/voice. result.AudioStream must be consumed using the SDK stream utilities appropriate to the host before disposing the client; this starter makes one request and does not prematurely destroy its stream. Account/voice/engine availability is a service prerequisite.",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Output and timing controls, @aws-sdk/client-polly",
      "display": "Synthesis command exposes TextType and OutputFormat plus SpeechMarkTypes; AudioStream and ContentType describe the returned payload. Use the documented format/mode combination for speech marks.",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Project function, @aws-sdk/client-polly",
      "display": "protected async convertTextToSpeech(\n\tinput: TextToSpeechInput,\n): Promise<TextToSpeechOutput> {\n\tconst { credentials } = await this._resolveCtx().fetchAuthSession();\n\tassertValidationError(\n\t\t!!credentials,\n\t\tPredictionsValidationErrorCode.NoCredentials,\n\t);\n\tassertValidationError(\n\t\t!!input.textToSpeech?.source,\n\t\tPredictionsValidationErrorCode.NoSource,\n\t);\n\n\tconst { speechGenerator } =\n\t\tthis._resolveCtx().resourcesConfig.Predictions?.convert ?? {};\n\tassertValidationError(\n\t\t!!speechGenerator?.region,\n\t\tPredictionsValidationErrorCode.NoRegion,\n\t);\n\n\tconst { defaults = {}, region } = speechGenerator;\n\n\tconst { voiceId: defaultVoiceId } = defaults;\n\tconst voiceId = input.textToSpeech?.voiceId ?? defaultVoiceId;\n\tassertValidationError(!!voiceId, PredictionsValidationErrorCode.NoVoiceId);\n\n\tthis.pollyClient = new PollyClient({\n\t\tregion,\n\t\tcredentials,\n\t\tcustomUserAgent: getAmplifyUserAgentObject({\n\t\t\tcategory: Category.Predictions,\n\t\t\taction: PredictionsAction.Convert,\n\t\t}),\n\t});\n\tconst synthesizeSpeechCommand = new SynthesizeSpeechCommand({\n\t\tOutputFormat: 'mp3',\n\t\tText: input.textToSpeech?.source?.text,\n\t\tVoiceId: voiceId as SynthesizeSpeechInput['VoiceId'],\n\t\tTextType: 'text',\n\t\tSampleRate: '24000',\n\t});\n\tconst data = await this.pollyClient.send(synthesizeSpeechCommand);\n\tconst response = new Response(data.AudioStream as ReadableStream);\n\tconst arrayBuffer = await response.arrayBuffer();\n\tconst blob = new Blob([arrayBuffer], {\n\t\ttype: data.ContentType,\n\t});\n\tconst url = URL.createObjectURL(blob);\n\n\treturn {\n\t\tspeech: { url },\n\t\taudioStream: arrayBuffer,\n\t\ttext: input.textToSpeech?.source?.text,\n\t} as TextToSpeechOutput;\n}\n",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Project source file, @aws-sdk/client-polly",
      "display": "packages/predictions/src/providers/AmazonAIConvertPredictionsProvider.ts",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project full_name, @aws-sdk/client-polly",
      "display": "aws-amplify/amplify-js",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Project stargazers_count, @aws-sdk/client-polly",
      "display": "9.6K",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Library name, microsoft-cognitiveservices-speech-sdk",
      "display": "microsoft-cognitiveservices-speech-sdk",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "Monthly downloads, microsoft-cognitiveservices-speech-sdk",
      "display": "2.7M",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "License, microsoft-cognitiveservices-speech-sdk",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Package release, microsoft-cognitiveservices-speech-sdk",
      "display": "1.53.0",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Package release date, microsoft-cognitiveservices-speech-sdk",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Install, microsoft-cognitiveservices-speech-sdk",
      "display": "npm install microsoft-cognitiveservices-speech-sdk",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Quickstart, microsoft-cognitiveservices-speech-sdk",
      "display": "import * as speech from 'microsoft-cognitiveservices-speech-sdk';\n\nconst config = speech.SpeechConfig.fromSubscription(\n  process.env.SPEECH_KEY, process.env.SPEECH_REGION\n);\nconst synthesizer = new speech.SpeechSynthesizer(config, null);\ntry {\n  const result = await new Promise((resolve, reject) => {\n    synthesizer.speakTextAsync('Hello, world!', resolve, reject);\n  });\n  console.log(result.audioData.byteLength);\n} finally {\n  synthesizer.close();\n}\n",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Official description, microsoft-cognitiveservices-speech-sdk",
      "display": "Provides the Microsoft Speech SDK for JavaScript.",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Quickstart source file, microsoft-cognitiveservices-speech-sdk",
      "display": "distrib/lib/src/sdk/SpeechSynthesizer.d.ts",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Repository stars, microsoft-cognitiveservices-speech-sdk",
      "display": "327",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Native text streaming, microsoft-cognitiveservices-speech-sdk",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "In-process synthesis, microsoft-cognitiveservices-speech-sdk",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "Native speech role, microsoft-cognitiveservices-speech-sdk",
      "display": "Speech synthesis client for Node/browser with text/SSML, output/voice configuration, word-boundary events, and preview text-stream request support.",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Setup and host requirements, microsoft-cognitiveservices-speech-sdk",
      "display": "Node ES module with SPEECH_KEY/SPEECH_REGION and Speech service access. AudioConfig=null keeps this first call in memory without speaker-device setup. The result callback can also report a canceled result; inspect reason/errorDetails in application error handling. No speech/audio code ran.",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Synthesis callbacks and markup, microsoft-cognitiveservices-speech-sdk",
      "display": "Native speakTextAsync/speakSsmlAsync and wordBoundary/synthesis events accompany audio/result metadata. speakAsync accepts the preview streaming request surface.",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "Project function, microsoft-cognitiveservices-speech-sdk",
      "display": "function () {\n        resultsDiv.innerHTML = \"\";\n        eventsDiv.innerHTML = \"\";\n        wordBoundaryList = [];\n        synthesisText = document.getElementById(\"synthesisText\");\n\n        // if we got an authorization token, use the token. Otherwise use the provided subscription key\n        var speechConfig;\n        if (subscriptionKey.value === \"\" || subscriptionKey.value === \"subscription\") {\n          alert(\"Please enter your Microsoft Cognitive Services Speech subscription key!\");\n          return;\n        }\n        speechConfig = SpeechSDK.SpeechConfig.fromSubscription(subscriptionKey.value, regionOptions.value);\n\n        speechConfig.speechSynthesisVoiceName = voiceOptions.value;\n        speechConfig.speechSynthesisOutputFormat = formatOptions.value;\n\n        player = new SpeechSDK.SpeakerAudioDestination();\n        player.onAudioStart = function(_) {\n          window.console.log(\"playback started\");\n          setTimeout(function(){ $(\"svg path :first-child\").each( function(i) {this.beginElement();}); }, 0.5);\n        }\n        player.onAudioEnd = function (_) {\n          window.console.log(\"playback finished\");\n          eventsDiv.innerHTML += \"playback finished\" + \"\\r\\n\";\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          pauseButton.disabled = true;\n          resumeButton.disabled = true;\n          wordBoundaryList = [];\n        };\n\n        var audioConfig  = SpeechSDK.AudioConfig.fromSpeakerOutput(player);\n\n        synthesizer = new SpeechSDK.SpeechSynthesizer(speechConfig, audioConfig);\n\n        // The event synthesizing signals that a synthesized audio chunk is received.\n        // You will receive one or more synthesizing events as a speech phrase is synthesized.\n        // You can use this callback to streaming receive the synthesized audio.\n        synthesizer.synthesizing = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(synthesizing) Reason: \" + SpeechSDK.ResultReason[e.result.reason] +\n                  \"Audio chunk length: \" + e.result.audioData.byteLength + \"\\r\\n\";\n        };\n\n        // The synthesis started event signals that the synthesis is started.\n        synthesizer.synthesisStarted = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(synthesis started)\" + \"\\r\\n\";\n          pauseButton.disabled = false;\n        };\n\n        // The event synthesis completed signals that the synthesis is completed.\n        synthesizer.synthesisCompleted = function (s, e) {\n          console.log(e);\n          eventsDiv.innerHTML += \"(synthesized)  Reason: \" + SpeechSDK.ResultReason[e.result.reason] +\n                  \" Audio length: \" + e.result.audioData.byteLength + \"\\r\\n\";\n        };\n\n        // The event signals that the service has stopped processing speech.\n        // This can happen when an error is encountered.\n        synthesizer.SynthesisCanceled = function (s, e) {\n          const cancellationDetails = SpeechSDK.CancellationDetails.fromResult(e.result);\n          let str = \"(cancel) Reason: \" + SpeechSDK.CancellationReason[cancellationDetails.reason];\n          if (cancellationDetails.reason === SpeechSDK.CancellationReason.Error) {\n            str += \": \" + e.result.errorDetails;\n          }\n          window.console.log(e);\n          eventsDiv.innerHTML += str + \"\\r\\n\";\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          pauseButton.disabled = true;\n          resumeButton.disabled = true;\n        };\n\n        // This event signals that word boundary is received. This indicates the audio boundary of each word.\n        // The unit of e.audioOffset is tick (1 tick = 100 nanoseconds), divide by 10,000 to convert to milliseconds.\n        synthesizer.wordBoundary = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(WordBoundary), Text: \" + e.text + \", Audio offset: \" + e.audioOffset / 10000 + \"ms.\" + \"\\r\\n\";\n          wordBoundaryList.push(e);\n        };\n\n        synthesizer.visemeReceived = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML += \"(Viseme), Audio offset: \" + e.audioOffset / 10000 + \"ms. Viseme ID: \" + e.visemeId + '\\n';\n          talkingHeadDiv.innerHTML = e.animation.replaceAll(\"begin=\\\"0.5s\\\"\", \"begin=\\\"indefinite\\\"\");\n          $(\"svg\").width('500px').height('500px');\n        }\n\n        synthesizer.bookmarkReached = function (s, e) {\n          window.console.log(e);\n          eventsDiv.innerHTML +=  \"(Bookmark reached), Audio offset: \" + e.audioOffset / 10000 + \"ms. Bookmark text: \" + e.text + '\\n';\n        }\n\n        const complete_cb = function (result) {\n          if (result.reason === SpeechSDK.ResultReason.SynthesizingAudioCompleted) {\n            resultsDiv.innerHTML += \"synthesis finished\";\n          } else if (result.reason === SpeechSDK.ResultReason.Canceled) {\n            resultsDiv.innerHTML += \"synthesis failed. Error detail: \" + result.errorDetails;\n          }\n          window.console.log(result);\n          synthesizer.close();\n          synthesizer = undefined;\n        };\n        const err_cb = function (err) {\n          startSynthesisAsyncButton.disabled = false;\n          downloadButton.disabled = false;\n          phraseDiv.innerHTML += err;\n          window.console.log(err);\n          synthesizer.close();\n          synthesizer = undefined;\n        };\n\n        if (!synthesisText.value) {\n          alert(\"Please enter synthesis content.\");\n          return;\n        }\n\n        startSynthesisAsyncButton.disabled = true;\n        downloadButton.disabled = true;\n\n        if (isSsml.checked) {\n          synthesizer.speakSsmlAsync(synthesisText.value,\n                  complete_cb,\n                  err_cb);\n        } else {\n          synthesizer.speakTextAsync(synthesisText.value,\n                  complete_cb,\n                  err_cb);\n        }\n      }\n",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Project source file, microsoft-cognitiveservices-speech-sdk",
      "display": "samples/js/browser/synthesis.html",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Project full_name, microsoft-cognitiveservices-speech-sdk",
      "display": "Azure-Samples/cognitive-services-speech-sdk",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Project stargazers_count, microsoft-cognitiveservices-speech-sdk",
      "display": "3.5K",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Library name, @google-cloud/text-to-speech",
      "display": "@google-cloud/text-to-speech",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Monthly downloads, @google-cloud/text-to-speech",
      "display": "1.7M",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "License, @google-cloud/text-to-speech",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Package release, @google-cloud/text-to-speech",
      "display": "7.2.0",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Package release date, @google-cloud/text-to-speech",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Install, @google-cloud/text-to-speech",
      "display": "npm install @google-cloud/text-to-speech",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Quickstart, @google-cloud/text-to-speech",
      "display": "const { TextToSpeechClient } = require('@google-cloud/text-to-speech');\n\n(async () => {\n  const client = new TextToSpeechClient();\n  const [result] = await client.synthesizeSpeech({\n    input: { text: 'Hello, world!' },\n    voice: { languageCode: 'en-US', ssmlGender: 'NEUTRAL' },\n    audioConfig: { audioEncoding: 'MP3' }\n  });\n})();\n",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "Repository stars, @google-cloud/text-to-speech",
      "display": "3.2K",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Native text streaming, @google-cloud/text-to-speech",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "In-process synthesis, @google-cloud/text-to-speech",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Native speech role, @google-cloud/text-to-speech",
      "display": "Node Cloud Text-to-Speech client with text/SSML synthesis and bidirectional streaming; service/model restrictions apply.",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Setup and host requirements, @google-cloud/text-to-speech",
      "display": "Node/CommonJS, project/API/billing enabled and Application Default Credentials configured. Default gRPC audioContent is bytes; callers save/play those bytes explicitly. No CLI/auth/credentials read or service call was performed by this research.",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Markup and bidirectional input, @google-cloud/text-to-speech",
      "display": "SSML requests can control supported pronunciation/pauses; bidirectional synthesis accepts input text while audio is returned. Voice/model restrictions come from the service streaming guide.",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Project function, @google-cloud/text-to-speech",
      "display": "async function synthesizeSsml(ssml, outputFile) {\n  // [START tts_synthesize_ssml]\n  const textToSpeech = require('@google-cloud/text-to-speech');\n  const fs = require('fs');\n  const util = require('util');\n\n  const client = new textToSpeech.TextToSpeechClient();\n\n  /**\n   * TODO(developer): Uncomment the following lines before running the sample.\n   */\n  // const ssml = '<speak>Hello there.</speak>';\n  // const outputFile = 'Local path to save audio file to, e.g. output.mp3';\n\n  const request = {\n    input: {ssml: ssml},\n    voice: {languageCode: 'en-US', ssmlGender: 'FEMALE'},\n    audioConfig: {audioEncoding: 'MP3'},\n  };\n\n  const [response] = await client.synthesizeSpeech(request);\n  const writeFile = util.promisify(fs.writeFile);\n  await writeFile(outputFile, response.audioContent, 'binary');\n  console.log(`Audio content written to file: ${outputFile}`);\n  // [END tts_synthesize_ssml]\n}\n",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "Project source file, @google-cloud/text-to-speech",
      "display": "texttospeech/synthesize.js",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Project full_name, @google-cloud/text-to-speech",
      "display": "GoogleCloudPlatform/nodejs-docs-samples",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Project stargazers_count, @google-cloud/text-to-speech",
      "display": "3.0K",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Library name, kokoro-js",
      "display": "kokoro-js",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Monthly downloads, kokoro-js",
      "display": "905.9K",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "License, kokoro-js",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Package release, kokoro-js",
      "display": "1.2.1",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Package release date, kokoro-js",
      "display": "May 2025",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Install, kokoro-js",
      "display": "npm install kokoro-js",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Quickstart, kokoro-js",
      "display": "import { KokoroTTS } from 'kokoro-js';\n\nconst tts = await KokoroTTS.from_pretrained(\n  'onnx-community/Kokoro-82M-v1.0-ONNX', { dtype: 'q8', device: 'wasm' }\n);\nconst audio = await tts.generate('Hello, world!', { voice: 'af_heart' });\n",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Repository stars, kokoro-js",
      "display": "10.2K",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "Native text streaming, kokoro-js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "In-process synthesis, kokoro-js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Native speech role, kokoro-js",
      "display": "Purpose-built Kokoro in-process speech model wrapper with voice/speed controls, waveform output, and incremental text generation.",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Setup and host requirements, kokoro-js",
      "display": "Supported JS/browser/Node runtime with compatible model/voice/ONNX/WASM assets available. First use can download weights; in-process inference does not mean every asset is already offline. Selected package uses Transformers^3.5.1, distinct from the separately researched Transformers4 toolkit.",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Actual model output, kokoro-js",
      "display": "generate returns RawAudio waveform/sampling-rate data; compatible peer3.5.1 declares toBlob():Blob, toWav():ArrayBuffer, and save(). Text stream splitting/generation is native; model/voice fetch cache policy is host-specific.",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Project function, kokoro-js",
      "display": "export async function predictKokoroVoice(input, onProgress) {\n  const tts = await loadRuntime(onProgress);\n  onProgress?.({ backend: \"wasm\", progress: 92 });\n  // Let React paint the phase change before main-thread WASM inference starts.\n  // Otherwise the last download label remains visible throughout generation.\n  await new Promise((resolve) => {\n    if (globalThis.requestAnimationFrame) requestAnimationFrame(() => resolve());\n    else setTimeout(resolve, 0);\n  });\n\n  // kokoro-js currently hard-codes its upstream voice-style URL. Intercept\n  // only that one request so every runtime voice artifact comes from the\n  // owned, immutable provider mirrors while retaining kokoro-js's cache key.\n  const upstreamUrl = `${UPSTREAM_VOICE_PREFIX}${input.voiceId}.bin`;\n  const originalFetch = globalThis.fetch;\n  const mirroredFetch = (resource, init) => {\n    const requestUrl = typeof resource === \"string\" ? resource : resource?.url;\n    return requestUrl === upstreamUrl\n      ? fetchOwnedVoiceStyle(input.voiceId, originalFetch, init)\n      : originalFetch(resource, init);\n  };\n  globalThis.fetch = mirroredFetch;\n  try {\n    const audio = await tts.generate(input.text, { voice: input.voiceId, speed: input.speed });\n    return audio.toBlob();\n  } finally {\n    if (globalThis.fetch === mirroredFetch) globalThis.fetch = originalFetch;\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Project source file, kokoro-js",
      "display": "src/lib/kokoroVoiceRuntime.js",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "Project full_name, kokoro-js",
      "display": "MartinDelophy/ai-video-editor",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Project stargazers_count, kokoro-js",
      "display": "987",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Library name, @cartesia/cartesia-js",
      "display": "@cartesia/cartesia-js",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Monthly downloads, @cartesia/cartesia-js",
      "display": "534.3K",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "License, @cartesia/cartesia-js",
      "display": "Apache-2.0",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Package release, @cartesia/cartesia-js",
      "display": "5.1.0",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Package release date, @cartesia/cartesia-js",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Install, @cartesia/cartesia-js",
      "display": "npm install @cartesia/cartesia-js",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Quickstart, @cartesia/cartesia-js",
      "display": "import Cartesia from '@cartesia/cartesia-js';\n\nconst client = new Cartesia({ apiKey: process.env.CARTESIA_API_KEY });\nconst response = await client.tts.generate({\n  model_id: 'sonic-latest',\n  transcript: 'Hello, world!',\n  voice: 'f786b574-daa5-4673-aa0c-cbe3e8534c02',\n  output_format: { container: 'wav', encoding: 'pcm_f32le', sample_rate: 44100 }\n});\nconst audio = await response.blob();\n",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Official description, @cartesia/cartesia-js",
      "display": "Provides the official TypeScript client for the Cartesia API.",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Quickstart source file, @cartesia/cartesia-js",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "Repository stars, @cartesia/cartesia-js",
      "display": "134",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Native text streaming, @cartesia/cartesia-js",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "In-process synthesis, @cartesia/cartesia-js",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Native speech role, @cartesia/cartesia-js",
      "display": "Speech service SDK with HTTP/SSE and WebSocket contexts accepting incremental text and returning decoded audio chunks.",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Setup and host requirements, @cartesia/cartesia-js",
      "display": "Supported server JS runtime, CARTESIA_API_KEY configured, and access to the chosen voice/model/output format. The example returns a Blob; no speaker, media player, WebSocket, or application server is started.",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Streaming protocol, @cartesia/cartesia-js",
      "display": "WebSocket contexts accept repeated transcript pushes and explicit no_more_inputs, with buffered receive iteration and typed timing/output options. Legacy id voice objects remain a supported VoiceSpecifier union member.",
      "asOf": "2026-11-20"
    },
    "F262": {
      "label": "Project function, @cartesia/cartesia-js",
      "display": "export async function generateSpeech(\n\ttext: string,\n\toptions: { outputPath?: string; category?: string; label?: string } = {},\n): Promise<string> {\n\tif (!getCartesiaApiKey()) throw new Error('CARTESIA_API_KEY not set');\n\tif (!text.trim()) throw new Error('Empty text');\n\n\t// Organize: results/audio/{category}/{label}-{timestamp}.wav\n\tconst category = options.category || 'general';\n\tconst label = options.label || 'tts';\n\tconst outDir = join(getWorkspace(), 'results', 'audio', category);\n\tmkdirSync(outDir, { recursive: true });\n\tconst outPath = options.outputPath || join(outDir, `${label}-${Date.now()}.wav`);\n\n\tconst client = new Cartesia({ apiKey: getCartesiaApiKey() });\n\tconst ws = await client.tts.websocket();\n\ttry {\n\t\tconst ctx = ws.context({\n\t\t\tmodel_id: 'sonic-3',\n\t\t\tvoice: { mode: 'id', id: getCartesiaVoiceId() },\n\t\t\toutput_format: {\n\t\t\t\tcontainer: 'raw',\n\t\t\t\tencoding: 'pcm_s16le',\n\t\t\t\tsample_rate: SAMPLE_RATE,\n\t\t\t},\n\t\t});\n\n\t\t// Push text in sentence chunks for natural prosody\n\t\tconst sentences = splitSentences(text);\n\t\tfor (const s of sentences) {\n\t\t\tawait ctx.push({ transcript: s.trim() + ' ' });\n\t\t}\n\t\tawait ctx.no_more_inputs();\n\n\t\tconst chunks: Buffer[] = [];\n\t\tfor await (const event of ctx.receive()) {\n\t\t\tif (event.type === 'chunk' && event.audio) {\n\t\t\t\tchunks.push(Buffer.isBuffer(event.audio) ? event.audio : Buffer.from(event.audio));\n\t\t\t} else if (event.type === 'done') {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// Write WAV with header\n\t\tconst pcm = Buffer.concat(chunks);\n\t\tconst header = createWavHeader(pcm.length, SAMPLE_RATE, CHANNELS, BIT_DEPTH);\n\t\twriteFileSync(outPath, Buffer.concat([header, pcm]));\n\t\treturn outPath;\n\t} finally {\n\t\tws.close();\n\t}\n}\n",
      "asOf": "2026-11-20"
    },
    "F263": {
      "label": "Project source file, @cartesia/cartesia-js",
      "display": "src/cartesia-tts.ts",
      "asOf": "2026-11-20"
    },
    "F264": {
      "label": "Project full_name, @cartesia/cartesia-js",
      "display": "sonichi/sutando",
      "asOf": "2026-11-20"
    },
    "F265": {
      "label": "Project stargazers_count, @cartesia/cartesia-js",
      "display": "411",
      "asOf": "2026-11-20"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript text-to-speech libraries Google Cloud Amazon Polly ElevenLabs Kokoro.js code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
