- Newest
- Most votes
- Most comments
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]
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
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.
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.
Relevant content
- AWS OFFICIALUpdated 7 months ago
- AWS OFFICIALUpdated 6 months ago
- AWS OFFICIALUpdated 2 years ago