managarten/services/matrix-tts-bot/src/config/configuration.ts
Till-JS 58a051645b feat(matrix): add TTS bot for text-to-speech conversion
- NestJS bot that converts text messages to speech via mana-tts
- Commands: !voice, !voices, !speed, !status, !help
- User settings stored in-memory (voice, speed per user)
- Docker config for Mac Mini deployment
- Setup script for bot registration

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-29 16:03:26 +01:00

40 lines
1.3 KiB
TypeScript

export default () => ({
port: parseInt(process.env.PORT || '3023', 10),
matrix: {
homeserverUrl: process.env.MATRIX_HOMESERVER_URL || 'http://localhost:8008',
accessToken: process.env.MATRIX_ACCESS_TOKEN || '',
allowedRooms: (process.env.MATRIX_ALLOWED_ROOMS || '').split(',').filter(Boolean),
storagePath: process.env.MATRIX_STORAGE_PATH || './data/bot-storage.json',
},
tts: {
url: process.env.TTS_URL || 'http://localhost:3022',
defaultVoice: process.env.DEFAULT_VOICE || 'af_heart',
defaultSpeed: parseFloat(process.env.DEFAULT_SPEED || '1.0'),
maxTextLength: parseInt(process.env.MAX_TEXT_LENGTH || '500', 10),
},
});
export const HELP_TEXT = `**TTS Bot - Hilfe**
Ich wandle deine Textnachrichten in Sprache um!
**Befehle:**
- \`!voice [name]\` - Stimme wechseln (z.B. \`!voice bm_daniel\`)
- \`!voices\` - Alle verfugbaren Stimmen anzeigen
- \`!speed [0.5-2.0]\` - Geschwindigkeit andern
- \`!status\` - Aktuelle Einstellungen
- \`!help\` - Diese Hilfe
**Verwendung:**
Schreibe einfach eine Nachricht und ich sende dir die Sprachausgabe zuruck.
**Beispiel-Stimmen:**
- \`af_heart\` - Amerikanisch weiblich (warm)
- \`bm_daniel\` - Britisch mannlich (klassisch)
- \`am_michael\` - Amerikanisch mannlich`;
export const WELCOME_TEXT = `**TTS Bot**
Ich wandle Textnachrichten in Sprache um!
Schreibe einfach eine Nachricht oder \`!help\` fur Hilfe.`;