fix tests for AWS speech

This commit is contained in:
Dave Horton
2023-03-24 08:59:16 -04:00
parent 17afb7102a
commit 409ad68123

View File

@@ -122,7 +122,14 @@ const testMicrosoftStt = async(logger, credentials) => {
const testAwsTts = async(logger, credentials) => {
try {
const client = new PollyClient(credentials);
const {region, accessKeyId, secretAccessKey} = credentials;
const client = new PollyClient({
region,
credentials: {
accessKeyId,
secretAccessKey
}
});
const command = new DescribeVoicesCommand({LanguageCode: 'en-US'});
const response = await client.send(command);
return response;
@@ -134,7 +141,14 @@ const testAwsTts = async(logger, credentials) => {
const testAwsStt = async(logger, credentials) => {
try {
const client = new TranscribeClient(credentials);
const {region, accessKeyId, secretAccessKey} = credentials;
const client = new TranscribeClient({
region,
credentials: {
accessKeyId,
secretAccessKey
}
});
const command = new ListVocabulariesCommand({});
const response = await client.send(command);
return response;