#react native

1 messages · Page 1 of 1 (latest)

tawdry flare
cyan kiteBOT
#

Hi @tawdry flare. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

mint agateBOT
#

Hey there! This channel allows you to ask Kapa.ai for assistance. But it looks like you haven't connected your Discord profile to your Deepgram account yet. You can do so at https://community.deepgram.com - by doing so, you'll be able to ask questions in #1115960287183511643 if you need human assistance!

cyan kiteBOT
#

Yes, the Deepgram API at api.deepgram.com/v1/listen supports PCM (Pulse-Code Modulation) audio for live streaming transcription. PCM is a raw audio format that Deepgram can process.

However, when streaming raw audio formats like PCM, it's crucial to provide additional information in your API request. Specifically, you need to include the encoding and sample rate parameters. This is because raw audio doesn't contain header information that Deepgram could use to automatically determine these details.

Here's what you need to know:

  1. For raw PCM audio, you should specify the encoding as "linear16" or another appropriate PCM encoding.
  2. You must also provide the sample rate of your audio stream.

An example API request URL for streaming PCM audio might look like this:

wss://api.deepgram.com/v1/listen?encoding=linear16&sample_rate=16000

It's important to note that if you're using containerized audio (like WAV), you shouldn't set these parameters, as Deepgram can extract this information from the container's header.

For React Native specifically, you'll need to ensure that you're correctly formatting and sending the PCM data over the WebSocket connection. The exact implementation will depend on how you're capturing or generating the audio in your React Native app.

For more detailed information on streaming live audio to Deepgram, including how to determine your audio format and set up your request correctly, you can refer to these resources:

Determining Your Audio Format for Live Streaming Audio
Transcribe - Live audio

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@tawdry flare Kapa.ai is still learning and improving, please let me know how I did by reacting below.