Skip to content

Conversation

jpvajda
Copy link
Contributor

@jpvajda jpvajda commented May 21, 2025

Proposed changes

  • Improves Readme format, to follow our SDK Readme standards
  • adds examples if needed
  • reorganizes examples when necessary

Types of changes

What types of changes does your code introduce to the community Python SDK?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update or tests (if none of the other choices apply)

Summary by CodeRabbit

Summary by CodeRabbit

  • New Features

    • Added a new example script demonstrating synchronous speech-to-text transcription from a URL using the Deepgram SDK.
  • Documentation

    • Restructured and expanded the README for improved organization and a detailed overview of SDK features.
    • Simplified installation instructions and added a dedicated section on version pinning.
    • Updated backwards compatibility and contributing guidelines for clarity.
    • Replaced most embedded code examples with placeholders and links to references or example directories.
    • Added new sections covering voice agent, text-to-speech, captions, text intelligence, authentication, management APIs, and logging.
    • Updated testing procedures with clearer instructions.

Copy link
Contributor

coderabbitai bot commented May 21, 2025

"""

Walkthrough

The README.md was extensively restructured and expanded to provide a comprehensive overview of the SDK features with minimal example snippets and placeholders, replacing detailed embedded examples. A new synchronous speech-to-text example script using a URL was added, demonstrating logging, configuration, transcription request, and formatted output. An older example script for URL transcription was removed.

Changes

File(s) Change Summary
README.md Extensively restructured with a detailed table of contents, placeholders for examples, reorganized sections, and updated guidance.
examples/speech-to-text/rest/sync/url/main.py Added new synchronous speech-to-text example script using a URL with logging, configuration, transcription, and formatted output.
examples/speech-to-text/rest/url/main.py Deleted old synchronous URL transcription example script.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant main.py
    participant DeepgramSDK

    User->>main.py: Run script
    main.py->>main.py: Load environment variables & setup logging
    main.py->>DeepgramSDK: Initialize Deepgram client
    main.py->>DeepgramSDK: Call transcribe_url(audio_url, options)
    DeepgramSDK-->>main.py: Return transcription response
    main.py->>User: Print formatted JSON result and elapsed time
Loading

Possibly related PRs

Suggested reviewers

  • lukeocodes
    """

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.

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 (6)
README.md (3)

87-94: Example code is clear but could be enhanced with comments.

The synchronous URL transcription example clearly demonstrates the basic usage. However, it could benefit from more inline comments explaining what each parameter does, especially for new users.

Consider adding comments to explain the purpose of key parameters:

 response = DeepgramClient().listen.rest.v("1").transcribe_url(
     source={"url": "https://dpgr.am/spacewalk.wav"},
-    options=PrerecordedOptions(model="nova-3")
+    options=PrerecordedOptions(
+        model="nova-3",  # Specifies which AI model to use for transcription
+    )
 )

323-336: Excellent version pinning guidance section.

The newly added "Pinning Versions" section provides valuable information for users on version management best practices.

Minor improvement suggestion:

- For a deeper understanding of how version numbers work, check out[semantic versioning](https://semver.org/).
+ For a deeper understanding of how version numbers work, check out [semantic versioning](https://semver.org/).

Add a space between "out" and the link to fix the formatting.

🧰 Tools
🪛 LanguageTool

[style] ~324-~324: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)

🪛 GitHub Actions: Check - mdlint

[error] 323-323: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Pinning Versions']


385-388: Clear explanation of backwards compatibility policy.

This section effectively communicates the backwards compatibility policy and support for older SDK versions. The mention of semantic versioning is consistent with the "Pinning Versions" section.

Consider adding a comma in this sentence:

- Within a major version (like `4.*`), we will maintain backward compatibility so your code will continue to work without breaking changes.
+ Within a major version (like `4.*`), we will maintain backward compatibility, so your code will continue to work without breaking changes.
🧰 Tools
🪛 LanguageTool

[uncategorized] ~385-~385: 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)

examples/speech-to-text/rest/sync/url/main.py (3)

19-22: Environment setup and clear audio URL definition.

Good practice to load environment variables early. The audio URL is clearly defined with a helpful comment.

Consider adding a comment to clarify which environment variables are expected, particularly DEEPGRAM_API_KEY:

 load_dotenv()
+# Loads DEEPGRAM_API_KEY from .env file

48-57: Effective timing and response handling.

The code properly measures transcription time and formats the JSON response for readability.

Consider adding more detailed timing information:

- print(f"time: {difference.seconds}")
+ print(f"time: {difference.total_seconds():.2f} seconds")

This will include milliseconds in the timing for more precise performance measurement.


59-60: Basic error handling.

The code includes basic exception handling, which is good practice.

Consider improving the error handling with more specific exception types:

- except Exception as e:
-     print(f"Exception: {e}")
+ except httpx.HTTPError as e:
+     print(f"HTTP error occurred: {e}")
+ except Exception as e:
+     print(f"Unexpected error: {e}")

This would provide more informative error messages for different failure scenarios.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 052aadd and fd7dd2e.

⛔ Files ignored due to path filters (1)
  • examples/speech-to-text/rest/sync/file/preamble.wav is excluded by !**/*.wav
📒 Files selected for processing (2)
  • README.md (5 hunks)
  • examples/speech-to-text/rest/sync/url/main.py (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
examples/speech-to-text/rest/sync/url/main.py (5)
deepgram/client.py (2)
  • DeepgramClient (409-669)
  • listen (460-464)
deepgram/clients/listen/v1/rest/options.py (1)
  • PrerecordedOptions (23-171)
deepgram/clients/common/v1/options.py (1)
  • UrlSource (24-35)
examples/speech-to-text/rest/sync/file/main.py (1)
  • main (24-62)
deepgram/utils/verboselogs/__init__.py (1)
  • verbose (165-168)
🪛 LanguageTool
README.md

[grammar] ~22-~22: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...t Token Details](#get-token-details) - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~324-~324: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[uncategorized] ~385-~385: 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)


[style] ~396-~396: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

🪛 GitHub Actions: Check - mdlint
README.md

[error] 84-84: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Transcription (Synchronous)']


[error] 85-85: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Remote Files']


[error] 110-110: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Transcription (Asynchronous / Callbacks)']


[error] 111-111: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Remote Files']


[error] 111-111: MD024/no-duplicate-heading: Multiple headings with the same content [Context: 'Remote Files']


[error] 121-121: MD024/no-duplicate-heading: Multiple headings with the same content [Context: 'Local Files']


[error] 129-129: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Transcription (Live / Streaming)']


[error] 130-130: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Live Audio']


[error] 136-136: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 138-138: MD042/no-empty-links: No empty links [Context: '[See the Example for more info...']


[error] 140-140: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Transcribing to Captions']


[error] 143-143: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 145-145: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Voice Agent']


[error] 148-148: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 150-150: MD042/no-empty-links: No empty links [Context: '[See the Example for more info...']


[error] 152-152: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Text to Speech']


[error] 155-155: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 157-157: MD042/no-empty-links: No empty links [Context: '[See the Example for more info...']


[error] 159-159: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Text Intelligence']


[error] 162-162: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 164-164: MD042/no-empty-links: No empty links [Context: '[See the Example for more info...']


[error] 166-166: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Authentication']


[error] 167-167: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get Token Details']


[error] 167-167: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Token Details']


[error] 170-170: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 172-172: MD042/no-empty-links: No empty links [Context: '[See the Example for more info...']


[error] 174-174: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Projects']


[error] 175-175: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get Projects']


[error] 175-175: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Projects']


[error] 178-178: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 180-180: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Project']


[error] 183-183: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 185-185: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Update Project']


[error] 188-188: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 190-190: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Delete Project']


[error] 193-193: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 195-195: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Keys']


[error] 196-196: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### List Keys']


[error] 196-196: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### List Keys']


[error] 199-199: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 201-201: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Key']


[error] 204-204: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 206-206: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Create Key']


[error] 209-209: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 211-211: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Delete Key']


[error] 214-214: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 216-216: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Members']


[error] 217-217: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get Members']


[error] 217-217: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Members']


[error] 220-220: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 222-222: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Remove Member']


[error] 225-225: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 227-227: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Scopes']


[error] 228-228: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get Member Scopes']


[error] 228-228: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Member Scopes']


[error] 231-231: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 233-233: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Update Scope']


[error] 236-236: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 238-238: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Invitations']


[error] 239-239: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### List Invites']


[error] 239-239: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### List Invites']


[error] 242-242: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 244-244: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Send Invite']


[error] 247-247: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 249-249: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Delete Invite']


[error] 252-252: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 254-254: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Leave Project']


[error] 257-257: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 259-259: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Usage']


[error] 260-260: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get All Requests']


[error] 260-260: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get All Requests']


[error] 263-263: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 265-265: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Request']


[error] 268-268: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 270-270: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Summarize Usage']


[error] 273-273: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 275-275: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Fields']


[error] 278-278: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 280-280: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Billing']


[error] 281-281: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get All Balances']


[error] 281-281: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get All Balances']


[error] 284-284: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 286-286: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Balance']


[error] 289-289: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 291-291: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Models']


[error] 292-292: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### Get All Models']


[error] 292-292: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get All Models']


[error] 295-295: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 297-297: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get Model']


[error] 300-300: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 302-302: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## On-Prem APIs']


[error] 303-303: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Above] [Context: '### List On-Prem credentials']


[error] 303-303: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### List On-Prem credentials']


[error] 306-306: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 308-308: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Get On-Prem credentials']


[error] 311-311: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 313-313: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Create On-Prem credentials']


[error] 316-316: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 318-318: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '### Delete On-Prem credentials']


[error] 321-321: MD042/no-empty-links: No empty links [Context: '[See our API reference for mor...']


[error] 323-323: MD022/blanks-around-headings: Headings should be surrounded by blank lines [Expected: 1; Actual: 0; Below] [Context: '## Pinning Versions']

🔇 Additional comments (8)
README.md (3)

390-405: Improved development and contributing section.

The development and contributing section has been nicely rewritten for clarity, with clear instructions for setting up the development environment.

🧰 Tools
🪛 LanguageTool

[style] ~396-~396: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)


103-104: Plan to replace @todo placeholders before finalizing PR.

Multiple sections contain @todo placeholders instead of actual examples. These should be replaced with real content before the PR is finalized.

Since this is marked as a work-in-progress (WIP) PR, it's acceptable to have these placeholders, but be sure to track which sections need to be completed. Consider creating a tracking issue or checklist to ensure all @todo items are addressed.

Also applies to: 113-114, 123-124, 132-134, 140-141, 145-146, 152-153, 159-160, 167-168


8-58: 💡 Verification agent

🧩 Analysis chain

Well-structured table of contents but needs formatting fixes.

The comprehensive table of contents provides an excellent overview of the SDK's capabilities. However, the markdown linting is failing due to heading spacing issues throughout the document. According to the pipeline failures, each heading should be surrounded by blank lines.

To fix the markdown linting errors:

- ## Transcription (Synchronous)
- ### Remote Files
+ ## Transcription (Synchronous)
+ 
+ ### Remote Files

Add blank lines before and after each heading throughout the document to resolve the pipeline failures.


🏁 Script executed:

#!/bin/bash
set -e
echo "Checking headings in README.md for missing blank lines:"
grep -nE '^(#{2,6}) ' README.md | while IFS=: read -r n line; do
  prev=$(sed -n "${n}-1p" README.md)
  next=$(sed -n "${n}+1p" README.md)
  if [[ -n "$prev" ]]; then
    echo "Line $n missing blank line before: $line"
  fi
  if [[ -n "$next" ]]; then
    echo "Line $n missing blank line after:  $line"
  fi
done

Length of output: 274


🏁 Script executed:

#!/bin/bash
# Verify blank lines around headings in README.md
mapfile -t lines < README.md
for i in "${!lines[@]}"; do
  line="${lines[$i]}"
  if [[ $line =~ ^#{2,6}\  ]]; then
    prev="${lines[$((i-1))]}"
    next="${lines[$((i+1))]}"
    # Trim whitespace
    prev_trimmed="${prev//[[:space:]]/}"
    next_trimmed="${next//[[:space:]]/}"
    if [[ -n "$prev_trimmed" ]]; then
      echo "Line $((i+1)): missing blank line before: $line"
    fi
    if [[ -n "$next_trimmed" ]]; then
      echo "Line $((i+1)): missing blank line after:  $line"
    fi
  fi
done

Length of output: 61169


Please add blank lines before and after all level-2 and level-3 headings in README.md

CI markdown-lint failures confirm that most ## and ### headings in your table of contents and subsequent sections lack the required surrounding blank lines. For example, our script flagged:

  • Line 84: ## Transcription (Synchronous) needs a blank line after
  • Line 85: ### Remote Files needs a blank line before
  • Line 110: ## Transcription (Asynchronous / Callbacks) needs a blank line after
  • Line 111: ### Remote Files needs a blank line before
  • Line 129: ## Transcription (Live / Streaming) needs a blank line after
  • Line 130: ### Live Audio needs a blank line before
  • …and dozens more throughout sections like Authentication, Projects, Keys, Usage, Billing, Models, On-Prem APIs, Pinning Versions, etc.

To fix, ensure every heading is surrounded by blank lines. For example:

-## Transcription (Synchronous)
-### Remote Files
+## Transcription (Synchronous)
+
+### Remote Files

Please apply this pattern to all level-2 and level-3 headings in README.md so the pipeline passes.

Likely an incorrect or invalid review comment.

🧰 Tools
🪛 LanguageTool

[grammar] ~22-~22: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...t Token Details](#get-token-details) - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)

examples/speech-to-text/rest/sync/url/main.py (5)

1-4: Appropriate copyright and license headers.

The file correctly includes copyright information and license details at the top.


5-17: Well-organized imports.

The imports are logically organized, with standard library imports first, followed by third-party and local imports.


25-34: Clear client initialization with commented alternatives.

The client initialization is well-explained with comments and shows both verbose and default configuration options.


35-46: Well-structured payload and options setup.

The example clearly demonstrates how to configure the transcription request with type hints and readable formatting.


63-64: Standard Python main function pattern.

The script follows the standard Python idiom for executing code when run directly.

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: 3

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

369-369: Add a blank line before the "Pinning Versions" heading
The ## Pinning Versions heading needs a preceding blank line to satisfy markdown style (MD022).

Apply this diff:

@@ around line 368
-...previous content...
+ 
 ## Pinning Versions
🧰 Tools
🪛 GitHub Actions: Check - mdlint

[error] 369-369: MD022/blanks-around-headings: Headings should be surrounded by blank lines. Expected: 1; Actual: 0; Below. Context: "## Pinning Versions"

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between fd7dd2e and 08ef82a.

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

[grammar] ~22-~22: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...t Token Details](#get-token-details) - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~370-~370: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[uncategorized] ~372-~372: Possible missing comma found.
Context: ...ts.txtfile, you can pin to a specific version like this: ```sh deepgram-sdk==4.1.0...

(AI_HYDRA_LEO_MISSING_COMMA)


[uncategorized] ~431-~431: 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)


[style] ~442-~442: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

🪛 GitHub Actions: Check - mdlint
README.md

[error] 9-9: MD051/link-fragments: Link fragments should be valid. Context: "Remote Files"


[error] 12-12: MD051/link-fragments: Link fragments should be valid. Context: "Remote Files"


[error] 13-13: MD051/link-fragments: Link fragments should be valid. Context: "Local Files"


[error] 369-369: MD022/blanks-around-headings: Headings should be surrounded by blank lines. Expected: 1; Actual: 0; Below. Context: "## Pinning Versions"

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 (3)
README.md (3)

8-15: Unify TOC entry and header labels
The “Local Files” entry under Transcription (Synchronous) does not include the “(Synchronous)” qualifier, whereas the Remote Files entry does. This inconsistency can confuse users and makes the generated anchor for Local Files differ from the naming convention used elsewhere. You can resolve this by either:

  1. Renaming the header at line 101:
    - ### Local Files
    + ### Local Files (Synchronous)
  2. Or updating the TOC entry at line 10 to:
    -   - [Local Files](#local-files)
    +   - [Local Files (Synchronous)](#local-files-synchronous)

78-78: Clarify installation instructions
Consider referencing the “Pinning Versions” section directly and standardizing the shell code fence language to bash (for consistency with other examples):

- To install the latest version available:
+ To install the latest version available (see “Pinning Versions” below):
 
-```sh
+```bash
 pip install deepgram-sdk

---

`88-95`: **Approve and tighten code snippet formatting**  
The synchronous URL transcription example is clear and concise. For consistency across code blocks, remove the space in the language specifier:

```diff
-``` python
+```python
 from deepgram import DeepgramClient, PrerecordedOptions

 response = DeepgramClient().listen.rest.v("1").transcribe_url(
     source={"url": "https://dpgr.am/spacewalk.wav"},
     options=PrerecordedOptions(model="nova-3")
 )

</blockquote></details>

</blockquote></details>

<details>
<summary>📜 Review details</summary>

**Configuration used: CodeRabbit UI**
**Review profile: CHILL**
**Plan: Pro**
**Cache: Disabled due to data retention organization setting**
**Knowledge Base: Disabled due to data retention organization setting**


<details>
<summary>📥 Commits</summary>

Reviewing files that changed from the base of the PR and between 08ef82a6b605b5f3620619b066034c6c46e4f350 and 35423c4a41fab7d96d79bda0ba35fc0f10d5c31c.

</details>

<details>
<summary>📒 Files selected for processing (1)</summary>

* `README.md` (5 hunks)

</details>

<details>
<summary>🧰 Additional context used</summary>

<details>
<summary>🪛 LanguageTool</summary>

<details>
<summary>README.md</summary>

[grammar] ~22-~22: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...t Token Details](#get-token-details) - [Projects](#projects)   - [Get Projects](#get-projects)   - [Get Project](#get-project)   - [Update Proj...

(PHRASE_REPETITION)

---

[style] ~370-~370: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)

---

[uncategorized] ~431-~431: 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)

---

[style] ~442-~442: Consider a more concise word here.
Context: ...G.md) guidelines for more information.  In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

</details>

</details>
<details>
<summary>🪛 GitHub Actions: Check - mdlint</summary>

<details>
<summary>README.md</summary>

[error] 369-369: markdownlint MD022: Headings should be surrounded by blank lines. Found 0 blank lines below heading '## Pinning Versions', expected 1.

</details>

</details>

</details>

<details>
<summary>🔇 Additional comments (2)</summary><blockquote>

<details>
<summary>README.md (2)</summary>

`97-100`: **API and example links look correct**  
Both the reference and example links in the synchronous URL transcription section resolve to the proper documentation and example script. Nice work!

---

`84-86`: **Skip WIP placeholders and unchanged headings**  
These sections are placeholders (`@TODO`) or headings/links introduced as part of the ongoing README reorganization. No detailed feedback is necessary until concrete content is added.  



Also applies to: 101-109, 113-121, 123-131, 131-141, 143-147, 149-155, 157-163, 165-171, 175-180, 185-208, 209-234, 235-248, 249-262, 263-282, 289-307, 315-327, 329-341, 343-368

</details>

</blockquote></details>

</details>

<!-- This is an auto-generated comment by CodeRabbit for review status -->

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: 13

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

78-83: Link to version pinning best practices
Consider referencing the “Pinning Versions” section (line 583) in the installation instructions, for example:

To install the latest version available (see [Pinning Versions](#pinning-versions) for details):

This guides users to the best practices later in the document.


116-120: Use context manager for file input
Ensure files are closed properly by using a with block instead of bare open(). For example:

-response = deepgram.listen.rest.v("1").transcribe_file(
-    source=open("path/to/your/audio.wav", "rb")
-)
+with open("path/to/your/audio.wav", "rb") as audio:
+    response = deepgram.listen.rest.v("1").transcribe_file(source=audio)

585-586: Refine wording in Pinning Versions
Consider replacing “For a deeper understanding” with a more direct phrase like “To learn more” to strengthen the call to action.

🧰 Tools
🪛 LanguageTool

[style] ~585-~585: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


601-604: Improve clarity and punctuation in Logging section

  • Replace “as a means to troubleshoot” with “to troubleshoot”.
  • Use “i.e.,” instead of “ie” and add a period after “etc.”.
    Example diff:
- This SDK provides logging as a means to troubleshoot and debug issues encountered.
+ This SDK provides logging to troubleshoot and debug issues encountered.

- ...higher (ie `Warning`, `Error`, etc) when...
+ ...higher (i.e., `Warning`, `Error`, etc.) when...
🧰 Tools
🪛 LanguageTool

[style] ~601-~601: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~601-~601: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


644-646: Add comma for readability
Insert a comma before “so” to separate independent clauses:

- maintain backward compatibility so your code will continue...
+ maintain backward compatibility, so your code will continue...
🧰 Tools
🪛 LanguageTool

[uncategorized] ~646-~646: 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)


657-659: Simplify phrasing in Development section
Replace “In order to develop new features for the SDK itself,” with “To develop new SDK features,” for conciseness.

🧰 Tools
🪛 LanguageTool

[style] ~657-~657: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 35423c4 and 0df4e11.

⛔ Files ignored due to path filters (1)
  • examples/speech-to-text/rest/async/file/preamble.wav is excluded by !**/*.wav
📒 Files selected for processing (2)
  • README.md (4 hunks)
  • examples/speech-to-text/rest/url/main.py (0 hunks)
💤 Files with no reviewable changes (1)
  • examples/speech-to-text/rest/url/main.py
🧰 Additional context used
🪛 LanguageTool
README.md

[grammar] ~22-~22: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...t Token Details](#get-token-details) - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~585-~585: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[style] ~601-~601: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~601-~601: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


[uncategorized] ~646-~646: 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)


[style] ~657-~657: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

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

100-108: Remote synchronous transcription snippet is correct
The code example demonstrates the transcribe_url call clearly, matches the API reference, and uses the correct versioning.


110-114: Example link is valid
The path ./examples/speech-to-text/rest/sync/url/main.py aligns with the newly added example script.


114-120: Local synchronous transcription snippet is clear
The transcribe_file example is concise and correct.


122-124: Local synchronous example link is correct
./examples/speech-to-text/rest/sync/file/main.py exists and matches the structure used throughout.


126-134: Asynchronous remote transcription example is well-formatted
The transcribe_url_async snippet correctly shows the callback_url usage and references the right example path.

Also applies to: 137-139


141-148: Asynchronous local transcription example is accurate
The transcribe_file_async snippet and its example link are consistent with the rest of the documentation.

Also applies to: 150-152


154-175: Streaming audio example is comprehensive
The WebSocket flow, event handling, and lifecycle management are all demonstrated correctly.

Also applies to: 177-180


181-190: WebVTT captions example is correct
Importing DeepgramConverter and converting to WebVTT is shown clearly.


193-200: SRT captions example is straightforward
The snippet accurately demonstrates SRT conversion.


203-234: Voice Agent example thoroughly demonstrates usage
The setup, configuration, and teardown steps for the agent WebSocket are all included and well explained.


236-243: Bullet list clearly outlines example flow
The high-level summary of steps (connection, events, audio) aligns with the snippet above.


250-253: Voice Agent links are valid
Both the API reference and ./examples/agent/ path match the new examples.


254-271: Text to Speech REST example is concise and functional
The save method usage and options are correctly illustrated.


273-276: Text to Speech REST links are accurate
The API and example directory links are correct.


277-316: Text to Speech Streaming example is accurate
The WebSocket events, streaming options, and lifecycle calls align with best practices.


318-321: Streaming TTS links are valid
References to the API and example directory are correct.


325-328: Verify example script exists
Ensure examples/text-intelligence/main.py is added and the link is valid.


669-676: Getting Help links are valid and helpful
All three community and issue links point to the correct destinations.

🧰 Tools
🪛 LanguageTool

[style] ~671-~671: Consider using polite language here.
Context: ... comments or find a bug in the project, let us know! You can either: - [Open an issue in t...

(INSERT_PLEASE)

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: 13

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

8-13: 🛠️ Refactor suggestion

Missing 'Initialization' section in TOC
The ## Initialization heading at line 85 isn't listed in the table of contents (lines 8–13). Users may skip setup instructions when navigating via the TOC.

Add an entry, for example:

-  - [Installation](#installation)
+  - [Installation](#installation)
+  - [Initialization](#initialization)
🧹 Nitpick comments (1)
README.md (1)

85-93: Initialization snippet is clear; consider env var example
Showing how to instantiate DeepgramClient is helpful. You might also demonstrate using an environment variable for the API key:

import os
from deepgram import DeepgramClient

deepgram = DeepgramClient(os.getenv("DEEPGRAM_API_KEY"))
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 0df4e11 and 0160d66.

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

[grammar] ~23-~23: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...ils) - Grant Token - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~628-~628: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[uncategorized] ~630-~630: Possible missing comma found.
Context: ...ts.txtfile, you can pin to a specific version like this: ```sh deepgram-sdk==4.1.0...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~644-~644: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~644-~644: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


[uncategorized] ~689-~689: 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)


[style] ~700-~700: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

🪛 GitHub Actions: Check - mdlint
README.md

[error] 346-346: markdownlint MD012/no-multiple-blanks: Multiple consecutive blank lines found (Expected: 1; Actual: 2).

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

79-83: Installation instructions look good
The pip install deepgram-sdk command matches the package name on PyPI and aligns with the badge at the top.

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

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

103-107: ⚠️ Potential issue

Fix Syntax in Remote Synchronous Example.

The transcribe_url snippet is missing a comma after the source argument and lacks the PrerecordedOptions import, so it won’t run as-is.

Apply this diff:

+from deepgram import PrerecordedOptions
 response = deepgram.listen.rest.v("1").transcribe_url(
-    source={"url": "https://dpgr.am/spacewalk.wav"}
+    source={"url": "https://dpgr.am/spacewalk.wav"},
-    options=PrerecordedOptions(model="nova-3") # Apply other options
+    options=PrerecordedOptions(model="nova-3")  # Apply other options
 )

118-121: ⚠️ Potential issue

Fix Syntax in Local Synchronous Example.

Add the missing comma after source and import PrerecordedOptions so the code block is valid Python.

+from deepgram import PrerecordedOptions
 response = deepgram.listen.rest.v("1").transcribe_file(
-    source=open("path/to/your/audio.wav", "rb")
+    source=open("path/to/your/audio.wav", "rb"),
-    options=PrerecordedOptions(model="nova-3") # Apply other options
+    options=PrerecordedOptions(model="nova-3")  # Apply other options
 )

135-139: ⚠️ Potential issue

Fix Syntax in Remote Asynchronous Example.

Ensure there’s a comma after callback_url and import PrerecordedOptions to make this snippet executable.

+from deepgram import PrerecordedOptions
 response = deepgram.listen.rest.v("1").transcribe_url_async(
     source={"url": "https://dpgr.am/spacewalk.wav"},
-    callback_url="https://your-callback-url.com/webhook"
+    callback_url="https://your-callback-url.com/webhook",
-    options=PrerecordedOptions(model="nova-3") # Apply other options
+    options=PrerecordedOptions(model="nova-3")  # Apply other options
 )

151-155: ⚠️ Potential issue

Fix Syntax in Local Asynchronous Example.

Add the missing comma after callback_url and import PrerecordedOptions so this example runs correctly.

+from deepgram import PrerecordedOptions
 response = deepgram.listen.rest.v("1").transcribe_file_async(
     source=open("path/to/your/audio.wav", "rb"),
-    callback_url="https://your-callback-url.com/webhook"
+    callback_url="https://your-callback-url.com/webhook",
-    options=PrerecordedOptions(model="nova-3") # Apply other options
+    options=PrerecordedOptions(model="nova-3")  # Apply other options
 )
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
Cache: Disabled due to data retention organization setting
Knowledge Base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 0160d66 and e0469a6.

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

[grammar] ~23-~23: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...ils) - Grant Token - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~475-~475: Consider removing “of” to be more concise
Context: ... Members Retrieves account objects for all of the accounts in the specified project_id. ...

(ALL_OF_THE)


[style] ~669-~669: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[style] ~685-~685: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~685-~685: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


[uncategorized] ~730-~730: 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)


[style] ~741-~741: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

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

79-79: Installation Simplification Approved.

Moving version-pinning guidance to its own section and streamlining this step to just pip install deepgram-sdk makes the instructions clearer and more focused.


85-93: Initialization Section Addition Approved.

Adding a dedicated Initialization section with the DeepgramClient import and example usage will help users get started faster.

@jpvajda jpvajda added the documentation Improvements or additions to documentation label May 21, 2025
@jpvajda jpvajda requested review from naomi-lgbt and lukeocodes May 22, 2025 21:15
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)
README.md (1)

79-83: Clarify installation instructions
The installation section shows how to install the latest version. Consider also demonstrating how to pin to a major version (e.g., pip install deepgram-sdk==4.*) or install from source for contributors.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 616c4c2 and 342f99d.

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

[grammar] ~23-~23: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...ils) - Grant Token - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~484-~484: Consider removing “of” to be more concise
Context: ... Members Retrieves account objects for all of the accounts in the specified project_id. ...

(ALL_OF_THE)


[style] ~696-~696: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[uncategorized] ~698-~698: Possible missing comma found.
Context: ...ts.txtfile, you can pin to a specific version like this: ```sh deepgram-sdk==4.1.0...

(AI_HYDRA_LEO_MISSING_COMMA)


[style] ~712-~712: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~712-~712: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


[uncategorized] ~757-~757: 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)


[style] ~768-~768: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

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

85-93: Initialization snippet is clear and correct
The import of DeepgramClient and instantiation with a placeholder API key are accurate and follow the SDK conventions.


96-100: Section headings align with ToC
The “## Pre-Recorded (Synchronous)” and its subsections (“### Remote Files (Synchronous)”, “### Local Files (Synchronous)”) are correctly formatted and match the anchors in the ToC.


102-109: Remote synchronous example is valid
The transcribe_url snippet includes the required import, correct parameter commas, and links to both the API reference and example script.


116-127: Local synchronous example is well-structured
The transcribe_file snippet correctly demonstrates file input, imports PrerecordedOptions, and maintains valid syntax.


134-146: Remote asynchronous example is correct
The transcribe_url_async snippet properly includes commas, the PrerecordedOptions import, and documentation links.


153-165: Local asynchronous example is consistent
The transcribe_file_async example is syntactically sound, follows the established pattern, and links to relevant references.

@jpvajda jpvajda changed the title [WIP] SDK Readme Improvements SDK Readme Improvements May 22, 2025
@@ -0,0 +1,61 @@
# Copyright 2023-2024 Deepgram SDK contributors. All Rights Reserved.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I added this updated URL example, as the older one was a bit limited in functionality. You can see what I removed below.

Co-authored-by: Naomi <[email protected]>
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: 0

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

8-59: ⚠️ Potential issue

Ensure Table of Contents includes top-level sections
The TOC currently jumps straight into the Pre-Recorded examples but omits key setup and overview sections—Documentation, Getting an API Key, Requirements, Installation, and Initialization. Adding these entries will improve navigability and help users find foundational information before diving into examples.

@@ -8,0 +8,6
+- [Documentation](#documentation)
+- [Getting an API Key](#getting-an-api-key)
+- [Requirements](#requirements)
+- [Installation](#installation)
+- [Initialization](#initialization)
+  
🧰 Tools
🪛 LanguageTool

[grammar] ~23-~23: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...ils) - Grant Token - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)

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

85-93: Refine wording for greater conciseness
Consider dropping "of" to make the description more direct.

- All of the examples below will require `DeepgramClient`.
+ All examples below require `DeepgramClient`.
🧰 Tools
🪛 LanguageTool

[style] ~86-~86: Consider removing “of” to be more concise
Context: ...ll deepgram-sdk ``` ## Initialization All of the examples below will require `DeepgramCl...

(ALL_OF_THE)

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 342f99d and 6ef34b7.

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

[grammar] ~23-~23: This phrase is duplicated. You should probably use “Projects Get” only once.
Context: ...ils) - Grant Token - Projects - Get Projects - Get Project - [Update Proj...

(PHRASE_REPETITION)


[style] ~86-~86: Consider removing “of” to be more concise
Context: ...ll deepgram-sdk ``` ## Initialization All of the examples below will require `DeepgramCl...

(ALL_OF_THE)


[style] ~484-~484: Consider removing “of” to be more concise
Context: ... Members Retrieves account objects for all of the accounts in the specified project_id. ...

(ALL_OF_THE)


[style] ~696-~696: Consider a different adjective to strengthen your wording.
Context: ...ide) if you'd like to learn more. For a deeper understanding of how version numbers wo...

(DEEP_PROFOUND)


[style] ~712-~712: To make your writing clearer, consider a more direct alternative.
Context: ... ## Logging This SDK provides logging as a means to troubleshoot and debug issues encountered. By defaul...

(AS_A_MEANS_TO)


[style] ~712-~712: In American English, abbreviations like “etc.” require a period.
Context: ...ages and higher (ie Warning, Error, etc) when you initialize the library as fol...

(ETC_PERIOD)


[uncategorized] ~757-~757: 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)


[style] ~768-~768: Consider a more concise word here.
Context: ...G.md) guidelines for more information. In order to develop new features for the SDK itself...

(IN_ORDER_TO_PREMIUM)

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

79-79: Installation text is clear
The instruction "To install the latest version available:" is concise and accurate for pip-based installation.


96-100: Section headings are well-structured
The "Pre-Recorded (Synchronous)" heading and its subheading clearly communicate the purpose of this section.


102-109: Remote synchronous transcription snippet is correct
The example properly demonstrates URL transcription with PrerecordedOptions and is syntactically valid.


112-115: Links to reference and example are accurate
Both the API reference and the example path match the new directory structure and will resolve correctly.


116-125: Local synchronous transcription snippet is valid
The example correctly shows how to transcribe a local file. For production code, you may wish to illustrate using a with open(...) as f: context manager to ensure the file is closed.


133-137: Asynchronous section headings are clear
The "Pre-Recorded (Asynchronous / Callbacks)" section and its subheading accurately set expectations for callback-style transcription.


139-147: Remote asynchronous transcription snippet is correct
This example properly demonstrates URL transcription with callbacks using transcribe_url_async.


153-165: Local asynchronous transcription snippet is valid
The code shows file-based async transcription correctly. Consider adding a context manager example for best practices.


171-175: Streaming Audio section header is well-defined
The heading and brief description effectively introduce real-time WebSocket transcription.


176-194: Streaming audio example is accurate
The snippet correctly demonstrates establishing a WebSocket connection, handling transcript events, sending audio, and closing the connection.

@jpvajda jpvajda requested a review from naomi-lgbt May 23, 2025 15:33
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.

NO NOTES. THANK YOU!!

@jpvajda jpvajda dismissed naomi-lgbt’s stale review May 29, 2025 19:40

dismissed since this is a pattern established in our JS SDK.

@jpvajda jpvajda merged commit 2bf98aa into main May 29, 2025
4 checks passed
@jpvajda jpvajda deleted the chore/readme-refactor branch May 29, 2025 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants