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

Option "redact" not working with wss live client. #335

Open
viniciusfont opened this issue Oct 7, 2024 · 1 comment
Open

Option "redact" not working with wss live client. #335

viniciusfont opened this issue Oct 7, 2024 · 1 comment
Assignees

Comments

@viniciusfont
Copy link

What is the current behavior?

Setting the "redact" option, as a string/array in the listenLiveClient options does not make the transcripion redacts the text.
https://developers.deepgram.com/docs/redaction#live-streaming-audio

Steps to reproduce

Create a listenLiveClient with redact option and say a SSN or a Credit Card informations.

      this.listenLiveClient = this.deepgramClient.listen.live({
        model: "nova-2",
        language: "en-US",
        smart_format: true,
        sample_rate: 16000,
        channels: 2,
        encoding: "linear16",
        interim_results: true,
        utterance_end_ms: 1000,
        vad_events: true,
        endpointing: 1000,
        diarize: false,
        multichannel: true,
        redact: ["pci", "ssn"],
      });

Expected behavior

The text back from the Websocket to be redact as in the documentation for live transcriptions:
Before: my credit card number is four four four four nine nine nine nine three...
After: my credit card number is *...
https://developers.deepgram.com/docs/redaction#live-streaming-audio

Please tell us about your environment

We want to make sure the problem isn't specific to your operating system or programming language.

  • Operating System/Version: Windows 11
  • Language: [TypeScript]
  • Browser: Chrome

Other information

Debugging AbstractLiveClient.js connect method, the URL is generated correctly:

AbstractLiveClient.js:100

requestUrl:
wss://api.deepgram.com/v1/listen?model=nova-2&language=en-US&smart_format=true&sample_rate=16000&channels=2&encoding=linear16&interim_results=true&utterance_end_ms=1000&vad_events=true&endpointing=1000&diarize=false&multichannel=true&redact=pii&redact=ssn

@naomi-lgbt naomi-lgbt self-assigned this Oct 8, 2024
@lukeocodes
Copy link
Contributor

You'll get a faster response using our community for issues related to the service. I try to leave this issues board for SDK related problems, and only leave issues open when we discover a bug related to our service - for others to see.

Can you please provide a request_id for one where the request has not been correctly redacted, and what your expectations where?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants