-
Notifications
You must be signed in to change notification settings - Fork 81
Chore: update readme #393
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Chore: update readme #393
Conversation
|
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 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. 📒 Files selected for processing (1)
WalkthroughThe 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
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
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this 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: FormatcreateClientas inline code.
WrapcreateClientin 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@TODOand links to nothing. Provide a valid example or remove the section.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 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 useslanguage: "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"; | |||
There was a problem hiding this comment.
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.
There was a problem hiding this 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
Usingfs.readFileSyncin 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.transcribeUrlwhich is synchronous. Update it to use.transcribeUrlCallbackwithCallbackUrl.-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)
Theinputsection usessampleRate(camelCase) whileoutputusessample_rate(snake_case). To maintain consistency, pick one style. For example, convertingsample_ratetosampleRate:-output: { - encoding: "mp3", - sample_rate: 24000, - bitrate: 48000, - container: "none", -}, +output: { + encoding: "mp3", + sampleRate: 24000, + bitrate: 48000, + container: "none", +},
696-696:⚠️ Potential issueFix 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
📒 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 (/agentand./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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!!!
There was a problem hiding this 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
📒 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 withcreateClientnote
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)
There was a problem hiding this 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 valuesWith the change from a specific
AudioEncodingunion to a genericstring, 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
📒 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
SpeakModelfrom 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 tsLength of output: 111
No remaining references to SpeakModel
A repository-wide search across all.ts/.jsfiles for imports or type usages ofSpeakModelreturned no matches. Removing its export insrc/lib/types/AgentLiveSchema.tsis safe and poses no breaking impact.
d772520 to
d7c975b
Compare
6b25cca to
2684c05
Compare
chore: updates SDK to our Readme standards chore: readme typo chore: removes TODOs
2684c05 to
b51279d
Compare
There was a problem hiding this 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 issueUse
.transcribeUrlCallbackin async browser example
In the Browser callbacks section, replace the synchronous method with the callback version and include aCallbackUrlinstance:- 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 issueReplace Node.js
fsusage in browser example
Browsers cannot usefs.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.sampleRateuses camelCase whileaudio.output.sample_rateuses 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.
Summary by CodeRabbit