deepgram / deepgram-python-sdk

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

Dictation feature does not work when punctuation characters are spoken after a pause #441

Closed rpriyanshu9 closed 3 months ago

rpriyanshu9 commented 3 months ago

What is the current behavior?

When the punctuation characters are spoken after the brief pause, deepgram doesn't return any results back. Eg.: If I state... "The patient presents today complaining of a headache {period}"

The service correctly returns... "The patient presents today complaining of a headache."

However if I say... "The patient presents today complaining of a headache"

Wait for that text to return and then say... "Period"

I receive a result from the service, but the text is empty, the confidence is 0. This is the behaviour for all the punctuation characters like comma, colon, question mark, etc.

Steps to reproduce

Enable punctuate and dictation settings in the SDK and try to generate the above provided example speech.

Expected behavior

Even after the pause, deepgram should recognise punctuation characters.

Please tell us about your environment

Other information

Related discord thread:

davidvonthenen commented 3 months ago

Hi @rpriyanshu9

I believe if you have punctuate and dictation enabled, that is the expected behavior. If you want to verbally provide the punctuation, then you need to set punctuate to false (or omit declaring it which is equal to false). If that doesn't give you what you are anticipating, I can forward this to the engineering team with the feedback.

Depending on your use case, you might want to try using the conversationalai model.

If you are doing medical-related work (as your examples might suggest), we have a medical model. However, I believe it requires moving into a growth plan (meaning you need to talk to a sales rep).

davidvonthenen commented 3 months ago

If you want to discuss further or to flush out a proposal for a desired behavior that I can take to engineering, I would be happy to discuss in Discord. Here is the link to join: https://dpgr.am/discord

Drop me a DM.