By using AWS re:Post, you agree to the Terms of Use

AWS CLI MP3 not recognized. Please help

0

When i tried the exercise at
https://docs.aws.amazon.com/polly/latest/dg/get-started-cli-exercise.html
the process fails with Unknown output type: mp3
I'm using windows syntax:
--output-format mp3 ^
Can anyone provide a clue as to why this isn't working?
Thanks
P.S. I tried mp3 as string "mp3" as well, same error

full transcript below, admin command prompt, win 10
C:\WINDOWS\system32>aws polly synthesize-speech ^
More? --output-format mp3 ^
More? --voice-id Joanna ^
More? --text "Hello" ^
More? hello.mp3
Unknown output type: mp3

Edited by: jcwdad on Feb 12, 2021 3:41 PM

asked 2 years ago27 views
6 Answers
0

Nobody from AWS or the forum can answer?

answered 2 years ago
0

Hi,

The error message seems to indicate a misconfiguration of the aws cli itself rather than an error in the command.

My hunch is that you may have specified mp3 as the general output format when running aws configure.

To solve this issue, simply rerun aws configure and specify any of the valid output formats e.g. json when prompted for the desired format.

Take a look at the documentation for all valid values - https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-config]

answered 2 years ago
0

C:\WINDOWS\system32>AWS configure
Hi and thank you
Still the same issue. This isn't a codec issue is it?

AWS Access Key ID [****************SCHI]: XXXXXXXXXXXX
AWS Secret Access Key [****************6Sp/]: XXXXXXXXXXXX
Default region name [us-east-1]: us-east-1
Default output format [mp3]: mp3

C:\WINDOWS\system32>aws polly synthesize-speech ^
More? --output-format mp3 ^
More? --voice-id Joanna ^
More? --text "Hello" ^
More? hello.mp3

Unknown output type: mp3

answered 2 years ago
0

Hi jcwdad,

Let me rephrase what my colleague said: "Default output format" that you configure using aws configure command should not be set to mp3 (Polly does not use it to determine the output format of the audio, it uses the argument --output-format that you pass along with the synthesize speech command). The output format that you see when running aws configure should be set to one of the following: json, yaml, yaml-stream, text, table (see the documentation https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-quickstart.html#cli-configure-quickstart-format - section Output format).

Hope this will help ;)
Jacek - AWS Polly.

answered 2 years ago
0

Thanks once more. You have to admit, it is just a little funny when the prompt asking you for an output format during the configure ends with "mp3". Like having a batch file that prompts for user entry with y/n but will not take y or n as input.

Anyway, the file was created this time, no errors. however, no playback:
File: C:\Windows\System32\hello.mp3
Code: -1 (FFFFFFFF)
Message: File was not found.

UPDATE:
Ok this is a little crazy, but now it works. For consistency, I was running the commands from a simple batch file. The file would be created but would not play. No error messages during creation, only the one above during playback. As I looked at my batch file I decided for convenience to change the path to my D drive. Ran batch again and this time it worked. No explanation for this. So i copied the file to System32, where i was originally running the commands, and it wouldn't open/play.

So for some security related reason, I'm guessing, the file will not play there.

answered a year ago
0

Thanks. Done.

answered a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions