Skip to content

TikTok TTS v1.0

Choose a tag to compare

@sfox38 sfox38 released this 15 Mar 10:27
48f4d43

TikTok TTS: v1.0.0

This is a modernized fork of the original philipp-luettecke/tiktoktts integration, updated for current Home Assistant versions with significant new features and bug fixes.

Important

If you are upgrading from the original integration, please read the Upgrading from the Original Integration section in the README before installing. A clean removal of the old integration is required.


🐛 Bug Fixes

  • Fixed PLATFORMS declaration: was a single value instead of a list, causing the integration to fail silently on modern HA versions
  • Fixed missing commas in SUPPORTED_VOICES: several singing/expressive voice entries were being silently concatenated into invalid strings by Python
  • Fixed default language and voice: changed from German (de / de_001) to English US (en_us / en_us_001)
  • Fixed broken GitHub URL in original en.json (pointed to wrong repository)

✨ New Features

  • UI config flow: integration is now configured via Settings -> Devices & Services, no configuration.yaml editing required
  • Live connection test: endpoint and session ID are validated before saving, so failures are caught at setup time
  • Options flow: change endpoint, voice, or session ID at any time via the gear icon, changes take effect immediately without a restart
  • Direct TikTok API mode: optional alternative to the proxy that calls TikTok's internal API directly using a browser session cookie, with automatic fallback across 4 known regional endpoints
  • Automatic text chunking: direct mode splits long messages at sentence and word boundaries to respect TikTok's 200-character per-request limit
  • Retry logic: both proxy and direct modes retry failed requests up to 2 times with backoff before giving up
  • Stable entity ID: always tts.tiktoktts_proxy or tts.tiktoktts_direct, no longer a random UUID

🔧 Technical / Internal Changes

  • Migrated from legacy Provider base class to modern TextToSpeechEntity
  • Replaced deprecated async_timeout library with Python's built-in asyncio.timeout
  • All hardcoded strings (API paths, field names, status codes, retry config) moved to const.py
  • Config stored entirely in entry.data - single source of truth for both setup and options flows
  • Full developer documentation added to all files

Credits

Role Person / Project
Original integration philipp-luettecke/tiktoktts
Community TTS proxy Weilbyte/tiktok-tts
Voice list reference oscie57/tiktok-voice