Skip to content
ํ”„๋กœ์ ํŠธ

lobehub/lobe-tts has 809 GitHub stars and 104 forks. GitHot measured -1 stars in 24 hours and -3 in 7 days. Last checked 2026-11-25 11:53 UTC. Last push 2026-11-12.

์ด ์ˆ˜์น˜๋ฅผ ์ธก์ •ํ•˜๋Š” ๋ฐฉ๋ฒ•

์ธก์ •๋œ ์Šคํƒ€ ์ฆ๊ฐ€

in 24h
-1
in 7 days
-3
in 15 days
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘
in 1 month
๊ธฐ๋ก ์ˆ˜์ง‘ ์ค‘

์„œ๋กœ ๊ฒน์น˜๋Š” ๊ธฐ๊ฐ„์˜ ์ˆœ์ฆ๊ฐ€๋Ÿ‰์ด๋ฉฐ ์ผ๋ณ„ ํ•ฉ๊ณ„๊ฐ€ ์•„๋‹™๋‹ˆ๋‹ค. ์ธก์ •๊ฐ’์ด ์—†์œผ๋ฉด ๋น„์›Œ ๋‘ก๋‹ˆ๋‹ค. ์Šคํƒ€๋Š” ๊ด€์‹ฌ๋„๋ฅผ ๋‚˜ํƒ€๋‚ด๋ฉฐ ํ’ˆ์งˆ์„ ๋ณด์žฅํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.

์†Œ๊ฐœ

๐ŸŽค Lobe TTS - ์„œ๋ฒ„์™€ ๋ธŒ๋ผ์šฐ์ €์—์„œ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ๊ณ ํ’ˆ์งˆ์˜ ์•ˆ์ •์ ์ธ TTS/STT ๋ผ์ด๋ธŒ๋Ÿฌ๋ฆฌ

์›น ๋ฐ ์•ฑ

README.md

Original

Lobe TTS

Give your app a voice, and ears.

Text-to-speech and speech-to-text for server and browser, with React hooks and audio components.



Documents ยท Changelog ยท Report Bug ยท Request Feature

Table of contents

TOC

โœจ Why Lobe TTS?

Lobe TTS (@lobehub/tts) lets you add natural-sounding speech output and voice input to your app, on the server or in the browser, in a few lines of TypeScript. It powers the voice features of ๐Ÿคฏ LobeHub.

  • Speak and listen โ€” turn text into speech and speech into text with one library
  • Pick your voice provider โ€” Microsoft Edge, Microsoft Speech, OpenAI or the browser's built-in speech, behind the same simple API
  • Server or browser โ€” generate audio files in Node.js / Bun, or speak directly in the user's browser
  • React-ready โ€” drop-in hooks and an audio player with progress, pause and download, so you don't build playback yourself
  • Smooth long-form playback โ€” long text starts playing quickly instead of waiting for the whole audio
  • AI-native โ€” skills.md and llms.txt let your coding agent use the real API instead of guessing

๐Ÿš€ Getting Started

[!IMPORTANT]
This package is ESM only.

$ pnpm i @lobehub/tts

The React entry @lobehub/tts/react also needs the peer dependencies @lobehub/ui@^6, react@^19 and react-dom@^19.

Generate speech on the server

// index.js โ€” run with `bun index.js`
import { EdgeSpeechTTS } from '@lobehub/tts';
import fs from 'node:fs';

const tts = new EdgeSpeechTTS({ locale: 'en-US' });

const response = await tts.create({
  input: 'This is a speech demonstration',
  options: { voice: 'en-US-GuyNeural' },
});

fs.writeFileSync('./speech.mp3', Buffer.from(await response.arrayBuffer()));

[!NOTE]
Edge Speech needs a global WebSocket. It is built into Bun and Node.js 22+; on older Node.js versions, set global.WebSocket from the ws package.

Play speech in React

import { AudioPlayer, useEdgeSpeech } from '@lobehub/tts/react';
import { Button, Flexbox } from '@lobehub/ui';

export default () => {
  const { isGlobalLoading, start, stop, audio } = useEdgeSpeech('Hello from Lobe TTS', {
    options: { voice: 'en-US-GuyNeural' },
  });

  return (
    <Flexbox gap={8}>
      <Button loading={isGlobalLoading} onClick={isGlobalLoading ? stop : start}>
        Speak
      </Button>
      <AudioPlayer audio={audio} isLoading={isGlobalLoading} onLoadingStop={stop} />
    </Flexbox>
  );
};

Using Next.js? Add transpilePackages: ['@lobehub/tts'] to next.config.js. For other providers, speech-to-text and more examples, see the documentation.

๐Ÿค– AI-Powered Development

Lobe TTS publishes agent-friendly docs, so your AI assistant can write code against the documented API.

Resource What it does
Agent Skills tts.lobehub.com/skills.md โ€” skill entry point with setup, workflow and an index of the docs
llms.txt tts.lobehub.com/llms.txt โ€” an llms.txt index of every docs page

Paste this into Cursor, Claude Code, Codex or any agent that can fetch URLs:

Read https://tts.lobehub.com/skills.md, then use @lobehub/tts to add a "read aloud" button to my React app.

Works with Cursor, Claude Code, Windsurf, GitHub Copilot and other tools that read skills.md or llms.txt.

๐Ÿ“ฆ Packages

Entry Use it for
@lobehub/tts Generate speech or transcribe audio, on the server or browser
@lobehub/tts/server Proxy OpenAI speech and transcription from your own API route
@lobehub/tts/react React hooks and audio player components

๐Ÿ“– Documentation

Visit tts.lobehub.com for guides, API reference and live demos. See the Changelog for release notes.

โŒจ๏ธ Local Development

You can use Github Codespaces for online development:

Or clone it for local development:

$ git clone https://github.com/lobehub/lobe-tts.git
$ cd lobe-tts
$ bun install
$ bun run docs:dev

๐Ÿค Contributing

Contributions of all types are more than welcome, if you are interested in contributing code, feel free to check out our GitHub Issues to get stuck in to show us what youโ€™re made of.

๐Ÿฉท Sponsor

Every bit counts and your one-time donation sparkles in our galaxy of support! You're a shooting star, making a swift and bright impact on our journey. Thank you for believing in us โ€“ your generosity guides us toward our mission, one brilliant flash at a time.

๐Ÿ”— Links


๐Ÿ“ License

Copyright ยฉ 2023 LobeHub.
This project is MIT licensed.

๊ด€๋ จ ํ”„๋กœ์ ํŠธ ์‚ดํŽด๋ณด๊ธฐ

๋ถˆ๋Ÿฌ์˜ค๋Š” ์ค‘โ€ฆ