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

jcwdad
已提問 3 年前檢視次數 364 次
6 個答案
0

Nobody from AWS or the forum can answer?

jcwdad
已回答 3 年前
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]

已回答 3 年前
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

jcwdad
已回答 3 年前
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.

已回答 3 年前
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.

jcwdad
已回答 3 年前
0

Thanks. Done.

jcwdad
已回答 3 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南