Pre-Recorded Audio Transcription
An overview of the Deepgram JavaScript SDK and Deepgram speech-to-text pre-recorded.
The Deepgram JavaScript SDK now works in both server and browser environments. A proxy configuration is required for browser environments (see the section below).
Installing the SDK
Initializing the SDK
Transcribing a file by URL
Any public audio or video file can be used.
Transcribing a file buffer
Any ArrayBufferLike
can be sent as the body. This includes file buffers from Node’s fs.readFile
/fs.readFileSync
, or a Blob.arrayBuffer()
in a browser client.
Transcribing a file stream
Any ReadStream
can be sent as the body. This includes a stream from Node’s fs.createReadStream
.
Pre-recorded Transcription Options
Transcription options are provided as an object to our transcription functions. Each of these parameters are found as unique features on the Pre-Recorded API reference.
Helper Functions
In the latest SDK version, caption formatting has been has been published as a standalone package and built into the SDK. You can use an import statement to invoke caption functionality from the stand alone caption package.