Skip to content

feat: export VoiceUtils from browser bundle#49

Merged
OwenMcGirr merged 1 commit into
mainfrom
feat/48-export-voiceutils-browser
Apr 12, 2026
Merged

feat: export VoiceUtils from browser bundle#49
OwenMcGirr merged 1 commit into
mainfrom
feat/48-export-voiceutils-browser

Conversation

@OwenMcGirr
Copy link
Copy Markdown
Collaborator

Closes #48

Summary

Adds export * as VoiceUtils from "./core/voice-utils" to src/browser.ts.

voice-utils.ts is pure utility functions over UnifiedVoice[] with no Node.js dependencies — safe for the browser bundle.

Why

Browser/bundler environments (e.g. Next.js with Turbopack) resolve js-tts-wrapper imports in client components to the browser bundle. VoiceUtils was only on the main ESM entry, which transitively pulls in sherpa-onnx-node native addons and fails to build.

Test plan

  • npm run build — browser bundle builds cleanly
  • import { VoiceUtils } from 'js-tts-wrapper/browser' works in a Next.js client component

@OwenMcGirr OwenMcGirr merged commit 597f0b4 into main Apr 12, 2026
6 checks passed
@OwenMcGirr OwenMcGirr deleted the feat/48-export-voiceutils-browser branch April 12, 2026 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: export VoiceUtils from browser bundle

1 participant