A powerful n8n workflow for local Text-to-Speech (TTS) generation using KOKORO and Python. Easily integrate custom audio generation into any n8n automation pipeline.
Download this n8n workflow template and start using it instantly.
Users who need to perform Text-to-Speech generation locally rather than relying on external APIs.
Developers integrating custom, local Python scripts into their broader n8n automation solutions.
Users looking for advanced n8n templates demonstrating the use of the Execute Command n8n node.
Technical users running self-hosted n8n instances who require access to local file systems and executables.
This advanced n8n workflow is designed for scenarios where localized, high-performance audio generation is required. While many n8n templates focus on integrating cloud services, this solution leverages the Execute Command n8n node to bridge the gap between the n8n platform and powerful, on-premise software like KOKORO TTS. This approach provides flexibility and eliminates latency associated with external service calls for generation tasks.
The n8n workflow starts by defining the content and voice profile. It then triggers the local Python script, generating an MP3 audio file on the local machine. Finally, the generated audio file is imported back into the n8n execution flow, allowing subsequent n8n nodes to process, store, or transmit the binary audio data. This entire process demonstrates the power of the n8n platform to orchestrate complex, hybrid cloud/local automation tasks.
This structured n8n workflow executes a four-step process to achieve local Text-to-Speech conversion:
text (e.g., "Hello world!") and the desired voice profile (e.g., "af_sarah").C:\KOKORO\voicegen.py), passing the input text and voice variables as command-line arguments. This script handles the actual TTS generation using KOKORO, resulting in an output file (e.g., D:\output.mp3).D:\output.mp3) and reads the newly created MP3 file, converting it into binary data within the n8n execution context, making it available for downstream processing in the n8n workflow.To use this specific n8n workflow, ensure you have the following prerequisites met:
voicegen.py) must exist at the path defined in the 'Run python script' n8n node (C:\KOKORO\voicegen.py). This script needs to be correctly configured to interface with KOKORO TTS and save the output audio to D:\output.mp3.command parameter in the 'Run python script' n8n node and the fileSelector in the 'Play sound' n8n node accordingly. Start (Manual Trigger n8n node): Serves as the initial n8n trigger to manually start the TTS generation process.
Passing variables (Set n8n node): Defines the critical input parameters needed for the external script execution. Key Configuration: JSON output is set to define voice and text values.
Run python script (Execute Command n8n node): The central component of this n8n workflow, executing the external Python script. Key Configuration: The command uses expressions to dynamically pass variables: =python C:\KOKORO\voicegen.py "{{ $json.text }}" "{{ $json.voice }}" 1.
Play sound (Read Binary Files n8n node): Reads the generated audio file back into the n8n context for further steps. Key Configuration: File Selector is set to the specific local output path (D:\output.mp3).
Leverage this complex n8n workflow to seamlessly convert Telegram voice notes into professionally structured emails using Whisper and GPT-4. This powerful n8n templates handles transcription, AI generation, and structured output parsing, ensuring reliable communication automation.

Use this powerful n8n workflow to automate converting Telegram voice messages into structured, tagged notes using OpenAI Whisper and GPT-4o, archiving them directly into Google Docs. Explore the versatility of n8n templates.

Use this comprehensive n8n workflow to turn simple Telegram messages into professional LinkedIn posts. Features include Gemini AI classification, web scraping, Brave search, and interactive Telegram approval, making this one of the most powerful n8n templates for social media automation.

Deploy a secure, custom timezone conversion API endpoint using this n8n workflow. It leverages the TimeZoneDB API to convert Unix timestamps between specified zones instantly.

Convert complex training text (HYROX, Strength, Running) into structured Intervals.icu workouts automatically using this advanced n8n workflow, leveraging the Claude Opus AI model.


Do you have a vision or project in mind? Allow me to bring it to life with the utmost design excellence. With over 15 years of experience in the industry, I guarantee that your designs will surpass those of your competitors.







































