voice
This commit is contained in:
parent
add124970e
commit
925e7eaf99
1 changed files with 4 additions and 1 deletions
|
|
@ -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}`);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue