fix usage of GetAuthHeaders

This commit is contained in:
2025-01-27 15:28:41 +00:00
parent f6da74d4d1
commit 8a9b56e30e
+4 -4
View File
@@ -210,11 +210,11 @@ export class Polly {
} }
} }
DescribeVoices(Engine = 'standard', LanguageCode = '', IncludeAdditionalLanguageCodes = true) { async DescribeVoices(Engine = 'standard', LanguageCode = '', IncludeAdditionalLanguageCodes = true) {
return DescribeVoices(this.#GetAuthHeaders(), Engine, LanguageCode, IncludeAdditionalLanguageCodes) return DescribeVoices(await this.#GetAuthHeaders(), Engine, LanguageCode, IncludeAdditionalLanguageCodes)
} }
SynthesizeSpeech( async SynthesizeSpeech(
Text, Text,
VoiceId, VoiceId,
TextType = 'text', TextType = 'text',
@@ -223,7 +223,7 @@ export class Polly {
OutputFormat = 'mp3', OutputFormat = 'mp3',
SampleRate = '24000') { SampleRate = '24000') {
return SynthesizeSpeech( return SynthesizeSpeech(
this.#GetAuthHeaders(), await this.#GetAuthHeaders(),
Text, Text,
VoiceId, VoiceId,
TextType, TextType,