All files / src config.ts

100% Statements 31/31
100% Branches 1/1
100% Functions 1/1
100% Lines 31/31

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 321x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 25x 25x  
/**
 * TTS Provider Configuration
 */
 
export interface TTSProviderConfig {
  serverUrl?: string;
  port?: number;
  defaultVoice?: string;
  defaultSpeed?: number;
  defaultFormat?: 'mp3' | 'wav' | 'opus';
  autoStart?: boolean;
  servicePath?: string;
  healthCheckTimeout?: number;
  verbose?: boolean;
}
 
export const DEFAULT_CONFIG: Required<TTSProviderConfig> = {
  serverUrl: 'http://localhost',
  port: 8000,  // Chatterbox service port
  defaultVoice: 'default',  // Chatterbox uses 'default' or cloned voice IDs
  defaultSpeed: 1.0,
  defaultFormat: 'wav',
  autoStart: true,
  servicePath: '/var/home/lilith/Code/@applications/@audio/speech-synthesis/chatterbox-tts-service',
  healthCheckTimeout: 10000,  // Longer timeout for model loading
  verbose: false,
};
 
export function mergeConfig(userConfig?: Partial<TTSProviderConfig>): Required<TTSProviderConfig> {
  return { ...DEFAULT_CONFIG, ...userConfig };
}