0

This is the section of my code where I think the keywords should go.

class TranscriptionService extends EventEmitter {
  constructor() {
    super();
    const deepgram = createClient(process.env.DEEPGRAM_API_KEY);
    this.dgConnection = deepgram.listen.live({
      encoding: 'mulaw',
      sample_rate: '8000',
      smart_format: true,
      model: 'nova-3',
      punctuate: true,
      interim_results: true,
      endpointing: 200,
      vad_events: true,
      language: "en-US",
      utterance_end_ms: 1000,
      querystring: {
        replace: 'mail:male'  // Add find and replace query parameter
      }
    });

I went through the Docs and haven't seen an example of code that looks like mine where I can as they all look something like "keywords=KEYWORD:INTENSIFIER"

My app is an AI that can talk over the phone but mistakes "male" for "mail" so I'm trying to use keyword boosting (maybe supression if possible) to fix this. Maybe my question is a bit stupid but any help would be appreciated.

I've tried adding another field for boosting but that didn't work as the word was still mistaked. I've found that it works a bit as I used the weird words "Systrom" and "Krieger" and it interperted both of them correctly whereas without it would have failed to but it simply wont work in my case. I thought if it will always replace mail with male I can at least use the "replace" function so it will search through and change it but it doesn't do anything. Example: Interaction 0: TTS -> TWILIO: Hello, this is [blank]. Can we begin? Interaction 0 – STT -> GPT: Mail. Mail.

(Ignore the interaction, it's just the fact that it hears mail every time.)

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.