mirror of
https://github.com/jambonz/jambonz-api-server.git
synced 2026-01-25 02:08:24 +00:00
fix tests for AWS speech
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user