Skip to content

Conversation

@jpvajda
Copy link
Contributor

@jpvajda jpvajda commented May 30, 2025

  • Updates the SDK readme to our current standards defined in the recent update to the Python SDK
  • Updates Agent example for V1

Summary by CodeRabbit

  • Documentation
    • Added new sections covering browser and Node.js examples for pre-recorded and streaming transcription.
    • Introduced a "Grant Token" authentication method with examples.
    • Expanded migration guidance and clarified backwards compatibility details.
    • Updated and reorganized sections for improved clarity, including new and revised code samples.
    • Enhanced configuration examples and added descriptive comments throughout.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented May 30, 2025

Warning

Rate limit exceeded

@naomi-lgbt has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 50 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 2684c05 and b51279d.

📒 Files selected for processing (1)
  • README.md (26 hunks)

Walkthrough

The README.md file was extensively updated to improve documentation. New sections and usage examples were added, including for browser and streaming scenarios. Migration guidance was expanded, API references were updated, and configuration examples were revised. Clarifications and formatting improvements were made throughout, with no changes to code or exported entities.

Changes

File(s) Change Summary
README.md Added new documentation sections, expanded migration guidance, updated examples, clarified details, improved formatting, and revised API references. No code or signature changes.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant README.md

    User->>README.md: Consults documentation
    README.md-->>User: Provides expanded migration, usage, and configuration examples
    User->>README.md: Looks up new streaming and browser usage
    README.md-->>User: Supplies new sections and code snippets
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@jpvajda jpvajda requested review from lukeocodes and naomi-lgbt May 30, 2025 23:33
@jpvajda jpvajda changed the title Chore/update readme Chore: update readme May 30, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 5

🧹 Nitpick comments (9)
README.md (9)

304-305: Resolve missing example link in Pre-Recorded section.
The placeholder [See our Example for more info]() is empty and marked @TODO. Please add the correct example URL or remove the placeholder.


375-376: Add missing callback example link.
The callback usage references [See our Example for more info]() without a URL. Add a link to the relevant example (e.g., ./examples/node-prerecorded/index.js).


156-157: Format createClient as inline code.
Wrap createClient in backticks (`createClient`) to improve readability.


86-89: Enhance Documentation section clarity.
Consider rephrasing to:

## Documentation  
Learn more from the official Deepgram API docs: [developers.deepgram.com](...).  

for consistency with other sections.


1010-1011: Add comma before “so” for compound sentence.
Change to "maintain backward compatibility, so your code will continue…" for grammatical correctness.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1010-~1010: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... we will maintain backward compatibility so your code will continue to work without...

(COMMA_COMPOUND_SENTENCE_2)


969-971: Standardize On-Prem credential section verbs.
The descriptions vary between "Lists", "Returns", "Creates", and "Deletes". Align with imperative present-tense (e.g., "List", "Get", "Create", "Delete") to match other sections.

Also applies to: 979-981, 990-991, 1000-1002


620-621: Unify example link phrasing for TTS Rest.
Replace [See our Example for info] with the consistent [See our Example for more info].


478-478: Consistent casing for “See our Example”.
Standardize to "See our Example for more info" (lowercase "our") to match other sections.


694-697: Fill in or remove Grant Token example placeholder.
The example is marked @TODO and links to nothing. Provide a valid example or remove the section.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 27398b6 and e86fead.

📒 Files selected for processing (1)
  • README.md (26 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[duplication] ~9-~9: Possible typo: you repeated a word.
Context: ...ating-from-earlier-versions) - V2 to V3 - V3.* to V3.4 - [V3.* to V...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~1010-~1010: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... we will maintain backward compatibility so your code will continue to work without...

(COMMA_COMPOUND_SENTENCE_2)

🔇 Additional comments (2)
README.md (2)

74-74: Section title aligns with updated TOC.
Renamed to "Get All Project Models" to match the Table of Contents link.


534-535: Verify the correct language code syntax.
The example uses language: "en". Confirm whether the Voice Agent V1 API expects locale codes like "en-US".

@@ -1,11 +1,7 @@
import { DEFAULT_AGENT_URL } from "../lib/constants";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file was changed because prettier caught some improvements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (4)
README.md (4)

338-346: Remove Node.js fs usage from browser example
Using fs.readFileSync in browser context will fail. Please use a browser-friendly approach (e.g., FileReader API or fetch+Blob).

-def fs.readFileSync("./examples/nasa.mp4")
+// Example using FileReader in the browser
+const fileInput = document.querySelector('input[type="file"]');
+fileInput.addEventListener('change', async (e) => {
+  const file = e.target.files[0];
+  const arrayBuffer = await new Promise((resolve, reject) => {
+    const reader = new FileReader();
+    reader.onload = () => resolve(reader.result);
+    reader.onerror = reject;
+    reader.readAsArrayBuffer(file);
+  });
+  const { result, error } = await _deepgram.listen.prerecorded.transcribeFile(
+    arrayBuffer,
+    { model: "nova" }
+  );
+  // ...
+});

416-428: Use the callback method in async browser example
The snippet under “Browser” is still calling .transcribeUrl which is synchronous. Update it to use .transcribeUrlCallback with CallbackUrl.

-const { result, error } = await _deepgram.listen.prerecorded.transcribeUrl(
+const { result, error } = await _deepgram.listen.prerecorded.transcribeUrlCallback(
     { url: "https://dpgr.am/spacewalk.wav" },
     new CallbackUrl("http://callback/endpoint"),
     { model: "nova" }
 );

523-531: Unify audio config property naming (camelCase vs snake_case)
The input section uses sampleRate (camelCase) while output uses sample_rate (snake_case). To maintain consistency, pick one style. For example, converting sample_rate to sampleRate:

-output: {
-  encoding: "mp3",
-  sample_rate: 24000,
-  bitrate: 48000,
-  container: "none",
-},
+output: {
+  encoding: "mp3",
+  sampleRate: 24000,
+  bitrate: 48000,
+  container: "none",
+},

696-696: ⚠️ Potential issue

Fix empty example link under Grant Token
The empty link (), combined with a TODO, fails markdownlint. Either add an example path or remove the link entirely. For example, to remove:

- [See our Example for info](). @TODO See if we need an example
+<!-- No example available at this time -->
🧰 Tools
🪛 GitHub Actions: CI

[error] 696-696: markdownlint MD042/no-empty-links: No empty links [Context: "See our Example for info"]

🧹 Nitpick comments (2)
README.md (2)

100-102: Refine phrasing in the V3. to V4 migration note*
For clarity and grammatical correctness, add “the” before “new V1 Agent API.”

-The Voice Agent interfaces have been updated to use the new Voice Agent V1 API. Please refer to our [Documentation](https://developers.deepgram.com/docs/voice-agent-v1-migration) on Migration to new V1 Agent API.
+The Voice Agent interfaces have been updated to use the new Voice Agent V1 API. Please refer to our [Documentation](https://developers.deepgram.com/docs/voice-agent-v1-migration) on the Migration to the new V1 Agent API.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~102-~102: You might be missing the article “the” here.
Context: ...ice-agent-v1-migration) on Migration to new V1 Agent API. ## Installation You can...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


648-648: Remove trailing period from “Analyze Text” heading
For consistency with other headings, drop the period:

-## Text Intelligence
-Analyze Text.
+## Text Intelligence
+Analyze Text
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e86fead and 43537fd.

📒 Files selected for processing (2)
  • README.md (26 hunks)
  • src/packages/AgentLiveClient.ts (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/packages/AgentLiveClient.ts
🧰 Additional context used
🪛 LanguageTool
README.md

[duplication] ~9-~9: Possible typo: you repeated a word.
Context: ...ating-from-earlier-versions) - V2 to V3 - V3.* to V3.4 - [V3.* to V...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~102-~102: You might be missing the article “the” here.
Context: ...ice-agent-v1-migration) on Migration to new V1 Agent API. ## Installation You can...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~1010-~1010: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... we will maintain backward compatibility so your code will continue to work without...

(COMMA_COMPOUND_SENTENCE_2)

🪛 GitHub Actions: CI
README.md

[error] 304-304: markdownlint MD042/no-empty-links: No empty links [Context: "[See our Example for more info..."]


[error] 332-332: markdownlint MD042/no-empty-links: No empty links [Context: "[See our Example for more info..."]


[error] 409-409: markdownlint MD042/no-empty-links: No empty links [Context: "[See our Example for more info..."]


[error] 696-696: markdownlint MD042/no-empty-links: No empty links [Context: "See our Example for info"]

🔇 Additional comments (16)
README.md (16)

7-7: Add “Documentation” to the TOC
The new link to the Documentation section (#documentation) correctly reflects the new “## Documentation” heading below.


11-11: Add “V3. to V4” migration entry to the TOC*
This aligns with the new migration subsection added later in the document.


28-28: Add “Pre-Recorded (Synchronous)” to the TOC
This correctly surfaces the new synchronous transcription section.


31-31: Add “Pre-Recorded (Asynchronous / Callbacks)” to the TOC
Good to see the callback-based examples linked.


36-36: Add “Streaming Audio” to the TOC
This matches the new live streaming section below.


39-39: Add “Text to Speech Rest” to the TOC
Consistent with the split between REST and streaming TTS examples.


40-40: Add “Text to Speech Streaming” to the TOC
Properly exposes the streaming TTS section.


74-74: Update TOC label to “Get All Project Models”
The TOC entry now matches the heading change at line 946.


86-86: Insert new “Documentation” section
Provides a clear link to the official Deepgram docs.


156-156: Clarify requirement for createClient
The note “All of the examples below will require createClient.” is helpful and correctly placed.


285-285: Add “## Pre-Recorded (Synchronous)” heading
This new section header correctly matches the TOC.


289-289: Describe remote-file transcription for synchronous API
The one-line description is concise and clear.


302-302: Link to Speech-to-Text API reference
The [See our API reference for more info] link is valid.


606-607: Verify Voice Agent example links
The reference and example links for the Voice Agent section point to valid locations (/agent and ./examples/node-agent-live/index.js).


610-620: Text to Speech Rest section
The new heading, snippet, and links for REST-based TTS look correct and align with the SDK changes.


622-622: Text to Speech Streaming heading
Splitting streaming TTS into its own section improves clarity.

lukeocodes
lukeocodes previously approved these changes Jun 3, 2025
Copy link
Contributor

@lukeocodes lukeocodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!!

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43537fd and d7c975b.

📒 Files selected for processing (1)
  • README.md (26 hunks)
🧰 Additional context used
🪛 LanguageTool
README.md

[duplication] ~9-~9: Possible typo: you repeated a word.
Context: ...ating-from-earlier-versions) - V2 to V3 - V3.* to V3.4 - [V3.* to V...

(ENGLISH_WORD_REPEAT_RULE)


[uncategorized] ~102-~102: You might be missing the article “the” here.
Context: ...ice-agent-v1-migration) on Migration to new V1 Agent API. ## Installation You can...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


[uncategorized] ~1002-~1002: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... we will maintain backward compatibility so your code will continue to work without...

(COMMA_COMPOUND_SENTENCE_2)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test / OS ubuntu-latest / Node 18
🔇 Additional comments (27)
README.md (27)

7-7: Added Documentation link in TOC
New top‐level link to the official Deepgram docs helps users quickly find detailed API reference.


11-11: Added V3. to V4 migration entry*
Including a migration path for V3.* → V4 aligns with the SDK changes in Voice Agent V1 API.


28-28: Added Pre-Recorded (Synchronous) section to TOC
This clearly groups synchronous transcription methods—good for discoverability.


31-31: Added Browser subsection under Pre-Recorded (Synchronous)
Documenting browser support separately helps clarify environment differences.


32-32: Added Pre-Recorded (Asynchronous / Callbacks) section to TOC
Providing callback‐style examples addresses different usage patterns.


35-35: Added Browser subsection under Pre-Recorded (Asynchronous / Callbacks)
Mirrors synchronous section for browser environments—consistent structure.


36-36: Added Streaming Audio entry to TOC
Live transcription deserves its own section—this improves navigation.


39-39: Added Text to Speech Rest entry to TOC
Separating REST TTS usage increases clarity.


40-40: Added Text to Speech Streaming entry to TOC
Complements the REST TTS section—good for streaming use cases.


74-74: Renamed “Get All Models” to “Get All Project Models” in TOC
Aligns with updated API naming and avoids ambiguity.


86-89: Introduced “## Documentation” section
Linking directly to developers.deepgram.com centralizes reference material.


100-103: Added “### V3. to V4” migration guide*
Clearly points users to Voice Agent V1 migration docs—essential after breaking changes.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~102-~102: You might be missing the article “the” here.
Context: ...ice-agent-v1-migration) on Migration to new V1 Agent API. ## Installation You can...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


156-157: Clarified example prerequisites with createClient note
Highlighting this requirement upfront reduces confusion for readers.


285-286: New “## Pre-Recorded (Synchronous)” section
Good logical grouping for synchronous transcription examples.


289-290: Added description for synchronous remote transcription
Concise and clear—sets context before code block.


302-302: Linked API reference for synchronous remote transcription
Direct reference ensures users can explore full parameter list.


328-328: Linked API reference for synchronous local transcription
Consistent linking across examples is helpful.


330-333: Added browser-specific header and description
Previews browser code for synchronous transcription—consistent with Node examples.


346-347: Referenced browser example for synchronous transcription
Linking to the HTML example is helpful to users trying code in browser.


424-427: Linked API reference and example for async browser transcription
Consistent pattern—API reference and example link are correct.


428-429: Introduced “## Streaming Audio” section
Separates live streaming use cases from pre-recorded examples.


446-447: Linked API reference and Node example for streaming audio
These links guide users effectively to reference and sample code.


448-452: Added browser header and description for streaming audio
Mirrors Node section—good consistency.


472-473: Linked browser example for streaming audio
Providing a working example repository is useful for developers.


937-938: Updated “Get All Project Models” header in documentation
Matches TOC update and aligns with API naming.


961-963: Clarified On-Prem credentials description
Describing credential sets improves understanding for self-hosted use.


1002-1004: Refined “Backwards Compatibility” policy language
Clear statement on semver guarantees and support levels helps set expectations.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~1002-~1002: Use a comma before ‘so’ if it connects two independent clauses (unless they are closely connected and short).
Context: ... we will maintain backward compatibility so your code will continue to work without...

(COMMA_COMPOUND_SENTENCE_2)

@jpvajda jpvajda requested a review from lukeocodes June 3, 2025 17:16
naomi-lgbt
naomi-lgbt previously approved these changes Jun 3, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
src/lib/types/AgentLiveSchema.ts (1)

17-17: Document supported encoding values

With the change from a specific AudioEncoding union to a generic string, there's no compile-time validation of encoding values. Consider adding a comment listing the supported encoding values to help developers.

      /**
       * @default "linear16"
+      * @example Supported values: "linear16", "mulaw", "alaw", "opus", "flac", etc.
       */
      encoding: string;
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d7c975b and d772520.

📒 Files selected for processing (3)
  • examples/node-agent-live/index.js (2 hunks)
  • src/lib/types/AgentLiveSchema.ts (5 hunks)
  • src/packages/AgentLiveClient.ts (2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/packages/AgentLiveClient.ts
🧰 Additional context used
🧬 Code Graph Analysis (1)
examples/node-agent-live/index.js (2)
examples/node-speak-live/index.js (3)
  • audioBuffer (35-35)
  • wavHeader (8-22)
  • writeFile (72-83)
examples/disabled_deno-prerecorded/index.js (1)
  • __dirname (5-5)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Test / OS ubuntu-latest / Node 18
🔇 Additional comments (3)
examples/node-agent-live/index.js (2)

8-36: Well-implemented WAV header generation function!

The dynamic WAV header generation is a significant improvement over hardcoded headers. The function correctly implements the WAV file format specification with proper chunk structures and size calculations.


137-149: Good improvement to audio file handling!

The addition of proper WAV headers ensures the output files are valid WAV files that can be played by standard audio players. The empty buffer check is also a good defensive programming practice.

src/lib/types/AgentLiveSchema.ts (1)

83-83:

Details

✅ Verification successful

Verify the impact of removing SpeakModel export

The removal of SpeakModel from exports is a breaking change. Ensure that all code importing this type has been updated.


🏁 Script executed:

#!/bin/bash
# Description: Check for any remaining imports of SpeakModel in the codebase

# Search for SpeakModel imports
rg -A 2 "import.*SpeakModel|from.*SpeakModel" --type ts --type js

# Search for any usage of SpeakModel type
rg ":\s*SpeakModel|<SpeakModel" --type ts

Length of output: 111


No remaining references to SpeakModel
A repository-wide search across all .ts/.js files for imports or type usages of SpeakModel returned no matches. Removing its export in src/lib/types/AgentLiveSchema.ts is safe and poses no breaking impact.

@jpvajda jpvajda force-pushed the chore/update-readme branch from d772520 to d7c975b Compare June 9, 2025 23:31
naomi-lgbt
naomi-lgbt previously approved these changes Jun 9, 2025
@naomi-lgbt naomi-lgbt force-pushed the chore/update-readme branch from 6b25cca to 2684c05 Compare June 9, 2025 23:39
jpvajda and others added 2 commits June 9, 2025 16:39
chore: updates SDK to our Readme standards

chore: readme typo

chore: removes TODOs
@naomi-lgbt naomi-lgbt force-pushed the chore/update-readme branch from 2684c05 to b51279d Compare June 9, 2025 23:40
@naomi-lgbt naomi-lgbt merged commit 7d41f18 into main Jun 9, 2025
3 checks passed
@naomi-lgbt naomi-lgbt deleted the chore/update-readme branch June 9, 2025 23:41
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Inline review comments failed to post. This is likely due to GitHub's limits when posting large numbers of comments. If you are seeing this consistently it is likely a permissions issue. Please check "Moderation" -> "Code review limits" under your organization settings.

Actionable comments posted: 1

♻️ Duplicate comments (2)
README.md (2)

405-422: ⚠️ Potential issue

Use .transcribeUrlCallback in async browser example
In the Browser callbacks section, replace the synchronous method with the callback version and include a CallbackUrl instance:

- const transcribeUrl = async () => {
-   const { result, error } = await _deepgram.listen.prerecorded.transcribeUrl(
-     { url: "https://dpgr.am/spacewalk.wav" },
-     { model: "nova" }
-   );
- };
+ import { CallbackUrl } from "@deepgram/sdk";
+ const transcribeUrl = async () => {
+   const { result, error } = await deepgram.listen.prerecorded.transcribeUrlCallback(
+     { url: "https://dpgr.am/spacewalk.wav" },
+     new CallbackUrl("https://your.callback/endpoint"),
+     { model: "nova" }
+   );
+ };

330-345: ⚠️ Potential issue

Replace Node.js fs usage in browser example
Browsers cannot use fs.readFileSync. Swap to a browser-friendly approach, for example:

- const transcribeFile = async () => {
-   const { result, error } = await _deepgram.listen.prerecorded.transcribeFile(
-     fs.readFileSync("./examples/nasa.mp4"),
-     { model: "nova" }
-   );
- };
+ const transcribeFile = async (file) => {
+   // Use FileReader or Blob.arrayBuffer() in browsers
+   const buffer = await file.arrayBuffer();
+   const { result, error } = await deepgram.listen.prerecorded.transcribeFile(
+     buffer,
+     { model: "nova" }
+   );
+ };
🧹 Nitpick comments (3)
README.md (3)

100-103: Refine migration subsection phrasing
Consider adjusting for grammar and clarity. For example:
“Please refer to our migration guide to the new V1 Agent API.”

🧰 Tools
🪛 LanguageTool

[uncategorized] ~102-~102: You might be missing the article “the” here.
Context: ...ice-agent-v1-migration) on Migration to new V1 Agent API. ## Installation You can...

(AI_EN_LECTOR_MISSING_DETERMINER_THE)


455-468: Complete the browser streaming example
The current placeholder comments lack actual microphone capture, frame handling, and event listeners. Either flesh out the snippet or link to a fully working demo for clarity.


516-525: Unify audio property naming
audio.input.sampleRate uses camelCase while audio.output.sample_rate uses snake_case. Pick one convention (e.g., sampleRate) and apply it consistently.

🛑 Comments failed to post (1)
README.md (1)

904-913: 🛠️ Refactor suggestion

Remove duplicate deprecated usage section
The “Summarize Usage” block is present twice—once current, once deprecated. Consolidate into a single section, clearly marking any deprecated endpoints to avoid confusion.

🤖 Prompt for AI Agents
In README.md around lines 904 to 913, there is a duplicated "Summarize Usage"
section with one marked as deprecated. Remove the duplicate deprecated usage
block and consolidate the information into a single section. Clearly indicate
which endpoints are deprecated to avoid confusion, ensuring the documentation is
concise and clear.

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

Successfully merging this pull request may close these issues.

4 participants