deepgram / deepgram-python-sdk

Official Python SDK for Deepgram's automated speech recognition APIs.
https://developers.deepgram.com
MIT License
175 stars 47 forks source link

Speaker confidence missing from PrerecordedResponse, and utterance confidence not set #373

Closed barapa closed 2 months ago

barapa commented 2 months ago

What is the current behavior?

Steps to reproduce

  1. Call with diarization:

        options = PrerecordedOptions(
            model=MODEL,
            language="en",
            smart_format=True,
            punctuate=True,
            paragraphs=True,
            diarize=True,
            keywords=keywords,
        )
    
        source: UrlSource = UrlSource(url=audio_url)
    
        response await self._deepgram.listen.asyncprerecorded.v("1").transcribe_url(
            source,
            options,
        )
  2. Dump the response
    logger.info(response.to_json())

Expected behavior

Both confidence and speaker_confidence to be present in the dumped json, as indicated in the docs

Please tell us about your environment

Python 3.12.1

barapa commented 2 months ago

Sorry, was looking at the wrong field. Closing as this was raised in error.