
Production-ready LLM → TTS endpoint to integrate into your app.
git clone https://github.com/inworld-ai/llm-to-tts-node
cd llm-to-tts-node
npm install
Log in to your Inworld account:
inworld login
Test locally with instant feedback:
inworld run ./graph.ts '{"input": {"user_input": "Hello, how are you?"}}'
Serve as an HTTP server with Swagger UI:
inworld serve ./graph.ts --swagger
Serve on custom port:
inworld serve ./graph.ts --port 8080
Deploy your graph to Inworld Cloud to create a persistent, production-ready endpoint:
inworld deploy ./graph.ts
llm-to-tts-node/
├── graph.ts # Main graph file with the LLM-TTS pipeline
├── metadata.json # Graph metadata
├── package.json # Project dependencies and scripts
├── README.md # Documentation
└── LICENSE # MIT License
The graph uses a SequentialGraphBuilder with the following nodes in order:
Edit the RemoteLLMChatNode configuration in {{graphFileName}}:
new RemoteLLMChatNode({
provider: 'anthropic', // Change to 'anthropic', 'google', etc.
modelName: 'claude-3-sonnet', // Change to desired model
stream: true,
// Add other provider-specific options
});
Add system messages to the LLMChatRequestBuilderNode:
new LLMChatRequestBuilderNode({
messages: [
{
role: 'system',
content: { type: 'text', text: 'You are a helpful assistant...' },
},
{
role: 'user',
content: { type: 'template', template: '{{user_input}}' },
},
],
});
Configure the TTS node for different voices or providers:
new RemoteTTSNode({
speakerId: 'Dennis',
modelId: 'inworld-tts-1-max',
});
You can insert additional nodes into the pipeline:
const graphBuilder = new SequentialGraphBuilder({
id: 'custom-text-node-llm',
nodes: [
new LLMChatRequestBuilderNode({...}),
new RemoteLLMChatNode({...}),
new CustomProcessingNode(), // Your custom node
new TextChunkingNode(),
new RemoteTTSNode(),
],
});
To package your graph for deployment:
npm run deploy
# or
npx inworld deploy {{graphFileName}}
This will create a deployment package that can be uploaded to Inworld Cloud.
For more information about:
Bug Reports: GitHub Issues
General Questions: For general inquiries and support, please email us at support@inworld.ai
git checkout -b feature/amazing-featuregit commit -m 'Add amazing feature'git push origin feature/amazing-featureThis project is licensed under the MIT License - see the LICENSE file for details.