@10xdevs/voice-sdk
v0.1.5
Published
React hooks for capturing microphone input and playing back audio in the browser.
Maintainers
Readme
@10xdevs/voice-sdk
React hooks for capturing microphone input and playing back audio in the browser, plus an example app built with the Vercel AI SDK.
useMic— record microphone audio with pause/resume, duration, and live input leveluseSpeaker— play back rawFloat32ArrayPCM samples or decoded audioBlobs
Docs
- Hooks guide — usage, return values, and how to publish
- AI SDK guide — text-to-speech and speech-to-text with
generateSpeechandtranscribe
Getting Started (demo app)
The Next.js app in this repo is a playground for the hooks.
npm run dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
Using the hooks in your own project
npm install @10xdevs/voice-sdkimport { useMic, useSpeaker } from "@10xdevs/voice-sdk";Publishing
The hooks in hooks/ are published as a standalone ESM library. Only dist/ is shipped. See the publishing guide for details.
npm run pub # build dist/ and publish publicly