This commit is contained in:
Dmitry 2026-01-05 04:09:13 +03:00
parent add124970e
commit 925e7eaf99

View file

@ -8,13 +8,16 @@ export class VoiceService {
constructor(private configService: ConfigService) { constructor(private configService: ConfigService) {
this.logger.log('Initializing VoiceService...'); this.logger.log('Initializing VoiceService...');
const voiceServiceHost = this.configService.get<string>('VOICE_SERVICE_HOST'); var voiceServiceHost = this.configService.get<string>('VOICE_SERVICE_HOST');
if (!voiceServiceHost) { if (!voiceServiceHost) {
const error = 'VOICE_SERVICE_HOST environment variable is not set'; const error = 'VOICE_SERVICE_HOST environment variable is not set';
this.logger.error(error); this.logger.error(error);
throw new Error(error); throw new Error(error);
} }
while (voiceServiceHost.endsWith('/')) {
voiceServiceHost = voiceServiceHost.slice(0, -1);
}
this.voiceServiceUrl = voiceServiceHost; this.voiceServiceUrl = voiceServiceHost;
this.logger.log(`VoiceService initialized with URL: ${this.voiceServiceUrl}`); this.logger.log(`VoiceService initialized with URL: ${this.voiceServiceUrl}`);