Downcity
CommandsPlugin

city tts

Manage the built-in TTS plugin and generate audio files from text

city tts

city tts manages the built-in TTS plugin.

This page remains as a command entry point. For the fuller plugin structure, see Plugin Overview, Plugin Configuration, and Plugin Actions.

What it manages

  • city-level plugin enable/disable
  • default speech model / voice / output format
  • one-off text-to-speech generation

Common examples

# inspect current tts config
city tts status

# enable the plugin
city tts on

# synthesize one local audio file
city tts synthesize "hello from city"

# override format / language / voice / output path
city tts synthesize "Hello from Downcity" --format wav --language en --voice default --output .downcity/out/welcome.wav

How To Use

  1. Enable the plugin:
city tts on
  1. Check whether the current model and dependency are ready:
city tts status
city tts doctor
  1. Generate an audio file:
city tts synthesize "This is a TTS test"
  1. Override parameters for one run when needed:
  • --language <language>: override the language hint, such as zh or en
  • --voice <voice>: override the voice id
  • --format <format>: output format, currently wav or flac
  • --speed <speed>: speech speed multiplier
  • --output <path>: output file path or output directory

Output

  • Returns the local output file path
  • Also returns a reusable <file type="audio">...</file> tag for downstream sending
  • If the Python runner prints non-fatal stderr, the command still succeeds and includes a short stderr summary

Notes

  • TTS is not attached to chat hooks by default.
  • city tts ... runs locally against the current project by default, so you do not need to start city agent first.
  • When the plugin is enabled and its dependency is available, the agent sees this capability through the system prompt and can call city tts synthesize ... directly.
  • It generates a local audio file and returns a reusable <file type="audio">...</file> tag for downstream sending.
  • Non-fatal Python runner stderr does not fail synthesis as long as the audio file is generated successfully.
  • Agent-local TTS parameters are persisted to project downcity.json under plugins.tts.