question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Speech - RecognitionConfig has no enableAutomaticPunctuation field

See original GitHub issue

Trying to use the Python google speech client lib using the new enableAutomaticPunctuation field but it throws an error. The use_enhanced, model, and metadata fields all work correctly.

So this works:

        config = types.RecognitionConfig(
            encoding=enums.RecognitionConfig.AudioEncoding.FLAC,
            language_code='en-US',
            use_enhanced=True,
            model='phone_call',
            metadata=metadata,
        )

this gives an error:

        config = types.RecognitionConfig(
            encoding=enums.RecognitionConfig.AudioEncoding.FLAC,
            language_code='en-US',
            use_enhanced=True,
            model='phone_call',
            metadata=metadata,
            enableAutomaticPunctuation=True,
        )
  File "/Users/albertlai/venv/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 484, in init
    field = _GetFieldByName(message_descriptor, field_name)
  File "/Users/albertlai/venv/lib/python3.5/site-packages/google/protobuf/internal/python_message.py", line 548, in _GetFieldByName
    (message_descriptor.name, field_name))
ValueError: Protocol message RecognitionConfig has no "enableAutomaticPunctuation" field.

Python v3.5.1 google-cloud-speech version v0.33.0 googleapis-common-protos v1.5.3

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
The-Guptacommented, Aug 10, 2018

@nick-jonas, It worked after enabling data logging.

0reactions
The-Guptacommented, Aug 9, 2018

@nick-jonas , even with importing google.cloud.speech_v1p1beta1 I get

ValueError: Protocol message RecognitionConfig has no “model” field.

Same as using google.cloud.speech.

Read more comments on GitHub >

github_iconTop Results From Across the Web

RecognitionConfig | Cloud Speech-to-Text Documentation
If false , no word-level confidence information is returned. The default is false . enableAutomaticPunctuation. boolean. If 'true', adds ...
Read more >
why enable_automatic_punctuation=true gives an error in ...
"ValueError: Protocol message RecognitionConfig has no "enableAutomaticPunctuation" field. ". what can i do to overcome this. def ...
Read more >
Google.Apis.Speech.v1.Data.RecognitionConfig Class ...
Encoding of audio data sent in all RecognitionAudio messages. This field is optional for FLAC and WAV audio files and required for all...
Read more >
Recognize - Speech v3.0.0+20220221
The request value is a data-structure with various fields. ... integer min-speaker-count: integer speaker-tag: integer enable-automatic-punctuation: boolean ...
Read more >
RecognitionConfig class - recognition_config_v1 - Pub.dev
API docs for the RecognitionConfig class from the recognition_config_v1 library, ... Setting this for requests in other languages has no effect at all....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found