Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

texttospeech.AudioEncoding.FLAC not present #13239

Open
1 task done
gwpl opened this issue Nov 1, 2024 · 2 comments
Open
1 task done

texttospeech.AudioEncoding.FLAC not present #13239

gwpl opened this issue Nov 1, 2024 · 2 comments
Labels
api: texttospeech Issues related to the Text-to-Speech API. type: docs Improvement to the documentation for an API. type: question Request for information or clarification. Not an issue.

Comments

@gwpl
Copy link

gwpl commented Nov 1, 2024

Determine this is the right repository

  • I determined this is the correct repository in which to report this bug.

Summary of the issue

texttospeech.AudioEncoding.FLAC not present when importing in python:

In [3]: ? texttospeech.AudioEncoding
Init signature:  texttospeech.AudioEncoding(*values)
Docstring:     
Configuration to set up audio encoder. The encoding
determines the output audio format that we'd like.

Values:
    AUDIO_ENCODING_UNSPECIFIED (0):
        Not specified. Will return result
        [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
    LINEAR16 (1):
        Uncompressed 16-bit signed little-endian
        samples (Linear PCM). Audio content returned as
        LINEAR16 also contains a WAV header.
    MP3 (2):
        MP3 audio at 32kbps.
    OGG_OPUS (3):
        Opus encoded audio wrapped in an ogg
        container. The result will be a file which can
        be played natively on Android, and in browsers
        (at least Chrome and Firefox). The quality of
        the encoding is considerably higher than MP3
        while using approximately the same bitrate.
    MULAW (5):
        8-bit samples that compand 14-bit audio
        samples using G.711 PCMU/mu-law. Audio content
        returned as MULAW also contains a WAV header.
    ALAW (6):
        8-bit samples that compand 14-bit audio
        samples using G.711 PCMU/A-law. Audio content
        returned as ALAW also contains a WAV header.

However when reading documentation :

https://cloud.google.com/speech-to-text/docs/reference/rest/v1/RecognitionConfig

looks like FLAC is one of available formats.

API client name and version

No response

Reproduction steps: code

from google.cloud import texttospeech
print(texttospeech.AudioEncoding.FLAC)

Reproduction steps: supporting files

N/A

Reproduction steps: actual results

N/A

Reproduction steps: expected results

N/A

OS & version + platform

Linux

Python environment

3.12.6

Python dependencies

N/A

Additional context

N/A

@gwpl gwpl added triage me I really want to be triaged. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Nov 1, 2024
@product-auto-label product-auto-label bot added the api: texttospeech Issues related to the Text-to-Speech API. label Nov 1, 2024
@vchudnov-g
Copy link
Contributor

Thanks for reporting this issue. You indicated this was an issue in texttospeech, but the doc link you sent is actually for a different API ("cloud/speech`, "speech-to-text"). The correct link for text-to-speech is https://cloud.google.com/text-to-speech/docs/reference/rest/v1beta1/AudioEncoding, which does not list FLAC.

Nevertheless, you report highlights a couple of places where our documentation appears to be out of date; we will address those.

@vchudnov-g vchudnov-g added type: question Request for information or clarification. Not an issue. type: docs Improvement to the documentation for an API. and removed type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. triage me I really want to be triaged. labels Nov 8, 2024
@gwpl
Copy link
Author

gwpl commented Nov 8, 2024

Thank you for taking care of this + having FLAC support across the board, would be nice anyway :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: texttospeech Issues related to the Text-to-Speech API. type: docs Improvement to the documentation for an API. type: question Request for information or clarification. Not an issue.
Projects
None yet
Development

No branches or pull requests

2 participants