-
Notifications
You must be signed in to change notification settings - Fork 96
SDK Readme Improvements #530
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
Conversation
""" WalkthroughThe 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
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
Possibly related PRs
Suggested reviewers
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: 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
⛔ 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 FilesAdd 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 doneLength 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 doneLength 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 FilesPlease 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.
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: 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
📒 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"
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 (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:
- Renaming the header at line 101:
- ### Local Files + ### Local Files (Synchronous)- 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 tobash
(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 -->
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: 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 awith
block instead of bareopen()
. 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 (ieWarning
,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
⛔ 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 thetranscribe_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
Thetranscribe_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
Thetranscribe_url_async
snippet correctly shows thecallback_url
usage and references the right example path.Also applies to: 137-139
141-148
: Asynchronous local transcription example is accurate
Thetranscribe_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
ImportingDeepgramConverter
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
Thesave
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
Ensureexamples/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)
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: 13
♻️ Duplicate comments (1)
README.md (1)
8-13
: 🛠️ Refactor suggestionMissing '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 instantiateDeepgramClient
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
📒 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
Thepip install deepgram-sdk
command matches the package name on PyPI and aligns with the badge at the top.
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
♻️ Duplicate comments (4)
README.md (4)
103-107
:⚠️ Potential issueFix Syntax in Remote Synchronous Example.
The
transcribe_url
snippet is missing a comma after thesource
argument and lacks thePrerecordedOptions
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 issueFix Syntax in Local Synchronous Example.
Add the missing comma after
source
and importPrerecordedOptions
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 issueFix Syntax in Remote Asynchronous Example.
Ensure there’s a comma after
callback_url
and importPrerecordedOptions
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 issueFix Syntax in Local Asynchronous Example.
Add the missing comma after
callback_url
and importPrerecordedOptions
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
📒 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.
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)
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
📒 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 ofDeepgramClient
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
Thetranscribe_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
Thetranscribe_file
snippet correctly demonstrates file input, importsPrerecordedOptions
, and maintains valid syntax.
134-146
: Remote asynchronous example is correct
Thetranscribe_url_async
snippet properly includes commas, thePrerecordedOptions
import, and documentation links.
153-165
: Local asynchronous example is consistent
Thetranscribe_file_async
example is syntactically sound, follows the established pattern, and links to relevant references.
@@ -0,0 +1,61 @@ | |||
# Copyright 2023-2024 Deepgram SDK contributors. All Rights Reserved. |
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.
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]>
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: 0
♻️ Duplicate comments (1)
README.md (1)
8-59
:⚠️ Potential issueEnsure 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
📒 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 withPrerecordedOptions
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 awith 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 usingtranscribe_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.
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.
NO NOTES. THANK YOU!!
dismissed since this is a pattern established in our JS SDK.
Proposed changes
Types of changes
What types of changes does your code introduce to the community Python SDK?
Put an
x
in the boxes that applySummary by CodeRabbit
Summary by CodeRabbit
New Features
Documentation