#Can I set tags or metadata after the open?

1 messages · Page 1 of 1 (latest)

mighty swan
#

I'm using the Javascript SDK, and I would like to track usage based on the logged in user. Unfortunately, I have to call the client.listen.live() function before I know the user. Is there a way I can set the tags or extra metadata after the connection is open but before it's closed? If not, please consider this for a future enhancement.

If you're interested, the reason I have to call it early is due to security rules in a Chrome extension. I use the action button to open a side panel, and I have 3 seconds after the action button is clicked (the user gesture) to open the connection. If I wait any longer than that to open the connection, then when I send the audio data, I never get a transcription back. So I go ahead and start transcription as soon as the panel opens, while the panel prompts for the email and password.

frail gazelleBOT
#

Thanks for asking your question. Please be sure to reply with as much detail as possible so we can assist you efficiently. Such as:

  • Provide the request_id if you've a question about a transcription response.
  • The options you used or the api.deepgram.com URL you sent your request to, including parameters.
  • Any code snippets you can include.
  • Any audio you can include, or if you can't share it here please email it to us at [email protected] and provide a link to this thread.
faint lynx
#

There isn’t a way to attach tags or extra metadata to an existing connection - but @hearty hedge might have ideas on how to adjust the Node code to delay opening the connection and still get a transcript

#

Depending on your data schema, you could also associate the email with the request ID in your own end somewhere.

What is the use case for attaching metadata to the connection in the first place? That might help us brainstorm ways to solve the core problem as well outside of directly attaching metadata

hearty hedge