Skip to content

[Feature] Gemini 3.1 Flash TTS support in messages.tts, with expressive tag passthrough #67458

Description

@barronlroth

OpenClaw already has a nice speech-provider architecture behind messages.tts and supports providers like ElevenLabs, OpenAI, Microsoft, and MiniMax. It would be great to add Gemini 3.1 Flash TTS as a first-class speech provider.

Why this would be valuable

Gemini 3.1 Flash TTS appears to support expressive inline prompt tags / stage directions such as:

  • [excitedly]
  • [whispers]
  • character/style directions
  • pacing/delivery cues

That makes it especially appealing for:

  • audio-note style replies
  • more natural assistant voice messages
  • storytelling / dramatic reads
  • richer spoken UX

Request

Please add a built-in Gemini speech provider to the messages.tts surface, similar to the existing providers.

Ideally this would support:

  1. Provider registration

    • expose Gemini as a normal speech provider under messages.tts.providers.<id>
  2. Tag passthrough

    • preserve expressive inline tags / stage directions in TTS input instead of stripping or normalizing them away
    • especially when using [[tts:text]]...[[/tts:text]]
  3. Normal OpenClaw integration

    • work with /tts
    • work with auto-TTS flows
    • support normal voice-note/audio attachment delivery
    • support provider selection/fallback like other TTS providers
  4. Config shape
    Something roughly like:

    {
      messages: {
        tts: {
          provider: "google",
          providers: {
            google: {
              model: "gemini-3.1-flash-tts",
              voice: "..."
            }
          }
        }
      }
    }
  5. Model-driven overrides

    • if possible, let [[tts:text]] and existing TTS directive flows feed expressive tagged text directly into Gemini TTS

Context

From the docs/code, OpenClaw already has a shared speech-provider registry architecture, so this seems like a natural extension rather than a one-off feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions