Skip to content
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

Clarify Example Support for Windows #414

Merged

Conversation

davidvonthenen
Copy link
Contributor

@davidvonthenen davidvonthenen commented Jun 12, 2024

Proposed changes

Addresses: #340

This clarifies the local Microphone example support for Windows. Since they are only examples and best effort because the portaudio installation (which the user is responsible for) is a little tricky.

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)

Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code.

  • I have read the CONTRIBUTING doc
  • I have lint'ed all of my code using repo standards
  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)

Further comments

NA

Summary by CodeRabbit

  • Documentation
    • Added instructions to install dependencies before running examples in the main README.
    • Included a note about potential issues with microphone examples on Windows due to portaudio dependency in the examples README.
    • Updated legacy_dict_microphone example README to specify it only works on Linux and macOS.
    • Standardized platform names from "MacOS" to "macOS" in the async_microphone and microphone example READMEs.

Copy link
Contributor

coderabbitai bot commented Jun 12, 2024

Warning

Rate limit exceeded

@dvonthenen has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 6 minutes and 34 seconds before requesting another review.

How to resolve this issue?

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

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

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

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

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between c6b7e33 and ed7c00e.

Walkthrough

The updates primarily focus on enhancing the documentation across various README.md files in the deepgram-python-sdk repository. These changes include adding installation instructions for dependencies, clarifications regarding platform compatibility, and ensuring consistency in platform naming conventions. No changes were made to the declarations of exported or public entities.

Changes

Files Change Summary
README.md Added instructions to install dependencies before running examples.
examples/README.md Added a note about microphone examples potentially not working on Windows due to portaudio dependency.
examples/streaming/legacy_dict_microphone/README.md Specified that the example only works on Linux and macOS, excluding Windows.
examples/streaming/async_microphone/README.md Updated platform names from "MacOS" to "macOS" for consistency.
examples/streaming/microphone/README.md Updated platform names from "MacOS" to "macOS" for consistency.

Poem

In README's lines, dependencies now show,
For Python's voice, instructions help you grow.
On Linux, macOS, the streams will flow,
But Windows needs a tweak, as we all know.
With names aligned, consistency we sow,
Documentation shines, like a rabbit's glow.
🐇✨📜


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

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>.
    • Generate unit testing code for this file.
    • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @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.

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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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: 2

Outside diff range and nitpick comments (8)
examples/README.md (2)

Line range hint 6-6: Consider using a more concise phrase.

Instead of "In order to run the code in the examples folder," consider simplifying to:

- In order to run the code in the `examples` folder,
+ To run the code in the `examples` folder,

Line range hint 10-10: Correct the spelling of "macOS".

- be using a MacOS or Linux.
+ be using a macOS or Linux.
examples/streaming/legacy_dict_microphone/README.md (1)

Line range hint 21-21: Avoid repetition and use a hyphen for "cross-platform".

- That package makes use of the [PortAudio library](http://www.portaudio.com/) which is a cross-platform open source audio library.
+ That package utilizes the [PortAudio library](http://www.portaudio.com/), a cross-platform, open-source audio library.
Tools
LanguageTool

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...


[grammar] ~7-~7: The operating system from Apple is written “macOS”. (MAC_OS)
Context: ...his example will only work on Linux and MacOS. Windows platforms are not supported. ...

Markdownlint

3-3: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces

README.md (5)

Line range hint 28-28: Add a comma for clarity.

- To access the Deepgram API you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).
+ To access the Deepgram API, you will need a [free Deepgram API Key](https://console.deepgram.com/signup?jump=keys).

Line range hint 72-72: Add a comma after "However".

- However you can still tweak options and settings if you need.
+ However, you can still tweak options and settings if you need.

Line range hint 193-193: Correct the article usage.

- Transcription From an URL
+ Transcription From a URL

Line range hint 214-214: Add a comma for clarity.

- To run each example set the `DEEPGRAM_API_KEY` as an environment variable
+ To run each example, set the `DEEPGRAM_API_KEY` as an environment variable

Line range hint 218-218: Simplify the expression.

- This SDK provides logging as a means to troubleshoot and debug issues encountered.
+ This SDK provides logging to troubleshoot and debug issues encountered.
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 3177017 and e827f41.

Files selected for processing (3)
  • README.md (1 hunks)
  • examples/README.md (1 hunks)
  • examples/streaming/legacy_dict_microphone/README.md (1 hunks)
Additional context used
LanguageTool
examples/README.md

[style] ~6-~6: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...working on this SDK. ## Prerequisites In order to run the code in the examples folder, ...


[grammar] ~10-~10: The operating system from Apple is written “macOS”. (MAC_OS)
Context: ...les.txt` for the examples 2. be using a MacOS or Linux. These examples are geared tow...

examples/streaming/legacy_dict_microphone/README.md

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...


[grammar] ~7-~7: The operating system from Apple is written “macOS”. (MAC_OS)
Context: ...his example will only work on Linux and MacOS. Windows platforms are not supported. ...


[style] ~21-~21: You have already used this phrasing in nearby sentences. Shortening it will avoid wordiness. (REP_MAKE_USE_OF)
Context: ...ned within the repository. That package makes use of the [PortAudio library](http://www.port...


[uncategorized] ~21-~21: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...rtaudio.com/) which is a cross-platform open source audio library. If you are on Linux, you...

README.md

[uncategorized] ~28-~28: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...g an API Key 🔑 To access the Deepgram API you will need a [free Deepgram API Key]...


[uncategorized] ~72-~72: A comma may be missing after the conjunctive/linking adverb ‘However’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ... clients shouldn't need to know about. However you can still tweak options and setting...


[misspelling] ~193-~193: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...rded/file/main.py) - Transcription From an URL - [examples/prerecorded/url](https:...


[uncategorized] ~214-~214: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ...ples/manage/usage/main.py) To run each example set the DEEPGRAM_API_KEY as an enviro...


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


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


[style] ~246-~246: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...r more information. ### Prerequisites In order to develop new features for the SDK itself...


[uncategorized] ~267-~267: A comma might be missing here. (AI_EN_LECTOR_MISSING_PUNCTUATION_COMMA)
Context: ... ## Getting Help We love to hear from you so if you have questions, comments or f...


[style] ~268-~268: This expression usually appears with a “please” in front of it. (INSERT_PLEASE)
Context: ... comments or find a bug in the project, let us know! You can either: - [Open an issue in t...

Markdownlint
examples/streaming/legacy_dict_microphone/README.md

3-3: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces

Additional comments not posted (1)
README.md (1)

172-176: Ensure the prerequisites are clear before running examples.

The instructions are clear and direct, ensuring users know to install dependencies before proceeding with examples.

examples/README.md Outdated Show resolved Hide resolved
examples/streaming/legacy_dict_microphone/README.md Outdated Show resolved Hide resolved
@davidvonthenen davidvonthenen force-pushed the clarify-windows-support branch from e827f41 to c6b7e33 Compare June 12, 2024 15:11
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: 2

Outside diff range and nitpick comments (14)
examples/README.md (3)

Line range hint 6-6: Consider using a more concise phrase to avoid wordiness.

- In order to run the code in the `examples` folder, you first need to:
+ To run the code in the `examples` folder, you first need to:

Line range hint 10-10: Update the platform name for consistency.

- be using a MacOS or Linux.
+ be using a macOS or Linux.

Line range hint 38-38: Consider adding the missing article for grammatical correctness.

- you can change directory into each example folder and run the example like so:
+ you can change the directory into each example folder and run the example like so:
examples/streaming/async_microphone/README.md (2)

Line range hint 3-3: Consider using a more concise phrase to avoid wordiness.

- This example uses the Microphone as input in order to detect conversation insights in what is being said.
+ This example uses the Microphone to detect conversation insights.

Line range hint 21-21: Avoid repetitive phrasing and consider using a hyphen for the compound adjective.

- That package makes use of the [PortAudio library](http://www.portaudio.com/) which is a cross-platform open source audio library.
+ That package uses the [PortAudio library](http://www.portaudio.com/), a cross-platform, open-source audio library.
examples/streaming/microphone/README.md (2)

Line range hint 3-3: Consider using a more concise phrase to avoid wordiness.

- This example uses the Microphone as input in order to detect conversation insights in what is being said.
+ This example uses the Microphone to detect conversation insights.

Line range hint 21-21: Avoid repetitive phrasing and consider using a hyphen for the compound adjective.

- That package makes use of the [PortAudio library](http://www.portaudio.com/) which is a cross-platform open source audio library.
+ That package uses the [PortAudio library](http://www.portaudio.com/), a cross-platform, open-source audio library.
examples/streaming/legacy_dict_microphone/README.md (1)

Line range hint 21-21: Avoid repetitive phrasing and consider using a hyphen for the compound adjective.

- That package makes use of the [PortAudio library](http://www.portaudio.com/) which is a cross-platform open source audio library.
+ That package uses the [PortAudio library](http://www.portaudio.com/), a cross-platform, open-source audio library.
Tools
LanguageTool

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...

Markdownlint

3-3: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces

README.md (6)

Line range hint 193-193: Correct the article usage.

- Transcription From an URL
+ Transcription From a URL

Line range hint 214-214: Add a comma for clarity.

- To run each example set the `DEEPGRAM_API_KEY` as an environment variable, then `cd` into each example folder and execute the example: `go run main.py`.
+ To run each example, set the `DEEPGRAM_API_KEY` as an environment, then `cd` into each example folder and execute the example: `go run main.py`.

Line range hint 218-218: Simplify the expression.

- This SDK provides logging as a means to troubleshoot and debug issues encountered.
+ This SDK uses logging to troubleshoot and debug issues.

Line range hint 218-218: Add a period after "etc".

- (ie `Warning`, `Error`, etc) when you initialize the library as follows:
+ (ie `Warning`, `Error`, etc.) when you initialize the library as follows:

Line range hint 246-246: Simplify the expression.

- In order to develop new features for the SDK itself
+ To develop new features for the SDK

Line range hint 268-268: Add politeness to the call to action.

- let us know! You can either:
+ please let us know! You can either:
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between e827f41 and c6b7e33.

Files selected for processing (5)
  • README.md (1 hunks)
  • examples/README.md (1 hunks)
  • examples/streaming/async_microphone/README.md (1 hunks)
  • examples/streaming/legacy_dict_microphone/README.md (1 hunks)
  • examples/streaming/microphone/README.md (1 hunks)
Additional context used
LanguageTool
examples/README.md

[style] ~6-~6: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...working on this SDK. ## Prerequisites In order to run the code in the examples folder, ...


[grammar] ~10-~10: The operating system from Apple is written “macOS”. (MAC_OS)
Context: ...les.txt` for the examples 2. be using a MacOS or Linux. These examples are geared tow...


[uncategorized] ~38-~38: You might be missing the article “the” here. (AI_EN_LECTOR_MISSING_DETERMINER_THE)
Context: ...ile (ie .bash_profile) you can change directory into each example folder and run the ex...

examples/streaming/async_microphone/README.md

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...


[style] ~21-~21: You have already used this phrasing in nearby sentences. Shortening it will avoid wordiness. (REP_MAKE_USE_OF)
Context: ...ned within the repository. That package makes use of the [PortAudio library](http://www.port...


[uncategorized] ~21-~21: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...rtaudio.com/) which is a cross-platform open source audio library. If you are on Linux, you...

examples/streaming/microphone/README.md

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...


[style] ~21-~21: You have already used this phrasing in nearby sentences. Shortening it will avoid wordiness. (REP_MAKE_USE_OF)
Context: ...ned within the repository. That package makes use of the [PortAudio library](http://www.port...


[uncategorized] ~21-~21: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...rtaudio.com/) which is a cross-platform open source audio library. If you are on Linux, you...

examples/streaming/legacy_dict_microphone/README.md

[style] ~3-~3: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...is example uses the Microphone as input in order to detect conversation insights in what is...


[style] ~21-~21: You have already used this phrasing in nearby sentences. Shortening it will avoid wordiness. (REP_MAKE_USE_OF)
Context: ...ned within the repository. That package makes use of the [PortAudio library](http://www.port...


[uncategorized] ~21-~21: If this is a compound adjective that modifies the following noun, use a hyphen. (EN_COMPOUND_ADJECTIVE_INTERNAL)
Context: ...rtaudio.com/) which is a cross-platform open source audio library. If you are on Linux, you...

README.md

[uncategorized] ~72-~72: A comma may be missing after the conjunctive/linking adverb ‘However’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA)
Context: ... clients shouldn't need to know about. However you can still tweak options and setting...


[misspelling] ~193-~193: Use “a” instead of ‘an’ if the following word doesn’t start with a vowel sound, e.g. ‘a sentence’, ‘a university’. (EN_A_VS_AN)
Context: ...rded/file/main.py) - Transcription From an URL - [examples/prerecorded/url](https:...


[uncategorized] ~214-~214: Possible missing comma found. (AI_HYDRA_LEO_MISSING_COMMA)
Context: ...ples/manage/usage/main.py) To run each example set the DEEPGRAM_API_KEY as an enviro...


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


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


[style] ~246-~246: Consider a shorter alternative to avoid wordiness. (IN_ORDER_TO_PREMIUM)
Context: ...r more information. ### Prerequisites In order to develop new features for the SDK itself...


[style] ~268-~268: This expression usually appears with a “please” in front of it. (INSERT_PLEASE)
Context: ... comments or find a bug in the project, let us know! You can either: - [Open an issue in t...

Markdownlint
examples/streaming/legacy_dict_microphone/README.md

3-3: Expected: 0 or 2; Actual: 1 (MD009, no-trailing-spaces)
Trailing spaces

Additional comments not posted (4)
examples/README.md (1)

16-16: The updated note on Windows support for microphone examples is clear and informative.

examples/streaming/async_microphone/README.md (1)

7-7: The note clearly states that Windows platforms are not supported for this example.

examples/streaming/microphone/README.md (1)

7-7: The note clearly states that Windows platforms are not supported for this example.

examples/streaming/legacy_dict_microphone/README.md (1)

7-7: The note clearly states that Windows platforms are not supported for this example.

README.md Show resolved Hide resolved
examples/streaming/legacy_dict_microphone/README.md Outdated Show resolved Hide resolved
@davidvonthenen davidvonthenen force-pushed the clarify-windows-support branch from c6b7e33 to ed7c00e Compare June 12, 2024 16:04
@davidvonthenen davidvonthenen merged commit bcccc16 into deepgram:main Jun 12, 2024
2 checks passed
@davidvonthenen davidvonthenen deleted the clarify-windows-support branch June 12, 2024 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants