mirror of
https://github.com/jambonz/speech-utils.git
synced 2025-12-19 03:37:49 +00:00
accept aws polly without credential
This commit is contained in:
@@ -112,7 +112,7 @@ const getAwsVoices = async(_client, logger, credentials) => {
|
||||
credentials: assumedRoleCreds,
|
||||
});
|
||||
} else {
|
||||
throw new Error('Missing Polly credential');
|
||||
client = new PollyClient();
|
||||
}
|
||||
const command = new DescribeVoicesCommand({});
|
||||
const response = await client.send(command);
|
||||
|
||||
@@ -288,7 +288,8 @@ const synthPolly = async(logger, {credentials, stats, language, voice, engine, t
|
||||
credentials: assumedRoleCreds,
|
||||
});
|
||||
} else {
|
||||
throw new Error('Missing Polly credential');
|
||||
// AWS RoleArn assigned to Instance profile
|
||||
polly = new PollyClient();
|
||||
}
|
||||
const opts = {
|
||||
Engine: engine,
|
||||
|
||||
Reference in New Issue
Block a user