Actions25
- Post Actions
- Topic Actions
- Upload Actions
Post → Prepare for TTS
AI-generatedSummary
Fetches or overrides a Discourse post body and cleans it for text-to-speech processing.
Inputs
- postId — Provide the Post ID or a URL to fetch post content directly from Discourse.
- rawTextOverride — Optional direct text input to clean for TTS. When set, this text is used instead of fetched post body.
- includeMetadataBlock — Whether to prepend a short spoken metadata preamble to the cleaned text.
- outputMode — How cleaned text should be returned for downstream TTS operations: Single Text, Chunks Array, or Chunk Items.
- chunkStrategy — How the node splits cleaned text into chunks: Sentence Aware or Paragraph Aware (only when output mode is Chunks Array or Chunk Items).
- maxChunkLength — Maximum character length per chunk (min 200).
- cleaningOptions — Options to clean the text: ensure heading punctuation, normalize hashtags/mentions, remove images/URLs, and strip code blocks.
Output shape
A single string, an array of strings, or an array of objects containing a text property (depending on outputMode).
When outputMode is 'singleText', the entire cleaned text is returned. When outputMode is 'chunksArray' or 'chunkItems', the text is split based on the selected chunk strategy and max length.
Examples
Example 1: Fetch a post by ID and return the cleaned text as a single string.
Set Post ID to 12345, outputMode to 'singleText'.
Example 2: Fetch a post and return it as an array of sentence-based chunks for TTS processing.
Set Post ID to 12345, outputMode to 'chunksArray', chunkStrategy to 'sentenceAware'.
Example 3: Use a custom text override instead of fetching a post.
Enter custom text in 'rawTextOverride', outputMode to 'chunkItems'.