homeguild_voice_openai_tts 0.1.0 copy "homeguild_voice_openai_tts: ^0.1.0" to clipboard
homeguild_voice_openai_tts: ^0.1.0 copied to clipboard

OpenAI TTS provider for homeguild_voice_kit. Natural-sounding text-to-speech with streaming sentence queue, voice selection, and speed control.

homeguild_voice_openai_tts #

OpenAI TTS provider for homeguild_voice_kit. Natural-sounding text-to-speech with a streaming sentence queue, voice selection, and speed control.

Part of Voice Kit by HomeGuild Labs.

Usage #

import 'package:homeguild_voice_openai_tts/homeguild_voice_openai_tts.dart';

final tts = OpenAITTSProvider(
  apiKey: 'YOUR_OPENAI_KEY',
  voice: 'alloy',        // alloy, echo, fable, onyx, nova, shimmer
  speed: 1.25,            // 0.25 to 4.0
  model: 'tts-1',         // or 'tts-1-hd' for higher quality
  textSanitizer: (text) => text.replaceAll('**', ''),  // strip markdown
  onUsageTracked: (seconds) => print('Used ${seconds}s of TTS'),
);

Pass it to VoiceConversationManager from homeguild_voice_kit:

final manager = VoiceConversationManager(
  sttProvider: stt,
  ttsProvider: tts,
  streamAdapter: myBackend,
);

Features #

  • Streaming sentence queue with sequential playback
  • Six voice options: alloy, echo, fable, onyx, nova, shimmer
  • Runtime speed adjustment (0.25x to 4.0x)
  • Optional text sanitizer callback (strip markdown, clean formatting)
  • Optional usage tracking callback
  • Graceful queue clearing for interruptions

Requirements #

  • An OpenAI API key with TTS access

License #

MIT — see LICENSE.

0
likes
130
points
--
downloads

Documentation

API reference

Publisher

verified publisherhomeguild.ai

OpenAI TTS provider for homeguild_voice_kit. Natural-sounding text-to-speech with streaming sentence queue, voice selection, and speed control.

Homepage
Repository (GitHub)
View/report issues

Topics

#voice #tts #openai #speech #ai

License

MIT (license)

Dependencies

audioplayers, flutter, homeguild_voice_kit, http, logging

More

Packages that depend on homeguild_voice_openai_tts