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

Remove TTS WS Implementation from main #433

Merged

Conversation

davidvonthenen
Copy link
Contributor

@davidvonthenen davidvonthenen commented Jul 15, 2024

Proposed changes

Temporarily Remove TTS WS Implementation. Will have a subsequent PR to be held for merge when the feature is ready.

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

  • Refactor
    • Temporarily disabled WebSocket-related features, including clients and response structures, to streamline future updates and maintenance.

Copy link
Contributor

coderabbitai bot commented Jul 15, 2024

Walkthrough

The overall change involves commenting out functionality related to the SpeakWebSocketClient and its associated options and responses across various files in the Deepgram project. This effectively disables WebSocket-related features for the speak module without removing the code entirely, allowing for potential reactivation in the future.

Changes

Files/Groups Change Summary
deepgram/__init__.py Commented out declarations related to SpeakWebSocketOptions and SpeakWebSocketClient.
deepgram/client.py Commented out SpeakWebSocketOptions import and related definitions.
deepgram/clients/__init__.py Commented out SpeakWebSocketOptions declaration and changes within the speak module.
deepgram/clients/speak/__init__.py Commented out declarations of SpeakWebSocketClient, AsyncSpeakWebSocketClient, and various response types.
deepgram/clients/speak/client.py Commented out declarations for WebSocket-related functionality and associated response classes.
deepgram/clients/speak/v1/__init__.py Commented out WebSocket-related import statements and references.

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.

@davidvonthenen davidvonthenen changed the title Remove TTS WS Implementation Remove TTS WS Implementation from main Jul 15, 2024
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

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 4bfadf5 and fa23f43.

Files selected for processing (6)
  • deepgram/init.py (2 hunks)
  • deepgram/client.py (2 hunks)
  • deepgram/clients/init.py (2 hunks)
  • deepgram/clients/speak/init.py (1 hunks)
  • deepgram/clients/speak/client.py (3 hunks)
  • deepgram/clients/speak/v1/init.py (1 hunks)
Files skipped from review due to trivial changes (1)
  • deepgram/client.py
Additional context used
Learnings (5)
deepgram/clients/speak/__init__.py (9)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
deepgram/clients/speak/v1/__init__.py (10)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/__init__.py:36-43
Timestamp: 2024-07-01T19:17:04.194Z
Learning: Unused imports in `deepgram/clients/listen/v1/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:42-50
Timestamp: 2024-07-01T19:13:28.504Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/__init__.py:19-24
Timestamp: 2024-07-01T19:14:20.539Z
Learning: Unused imports in `deepgram/clients/listen/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/client.py:30-30
Timestamp: 2024-07-11T14:10:17.231Z
Learning: The `LiveOptions` import in `deepgram/clients/listen/v1/websocket/client.py` is intentionally present for future use and should not be flagged for removal in reviews.
deepgram/clients/speak/client.py (6)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#424
File: deepgram/client.py:81-81
Timestamp: 2024-06-27T00:06:01.811Z
Learning: Imports for SpeakStreamClient and AsyncSpeakStreamClient in `deepgram/client.py` are necessary for export purposes and should not be flagged as unused in reviews.
deepgram/clients/__init__.py (6)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/client.py:30-30
Timestamp: 2024-07-11T14:10:17.231Z
Learning: The `LiveOptions` import in `deepgram/clients/listen/v1/websocket/client.py` is intentionally present for future use and should not be flagged for removal in reviews.
deepgram/__init__.py (6)
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:10-10
Timestamp: 2024-07-01T19:14:59.869Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility, even if they are flagged as unused.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:11-11
Timestamp: 2024-07-01T19:14:53.172Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/v1/websocket/__init__.py:14-14
Timestamp: 2024-07-01T19:14:41.918Z
Learning: User dvonthenen prefers to retain unused imports in the codebase to maintain backward compatibility.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/speak/__init__.py:16-19
Timestamp: 2024-07-01T19:12:57.715Z
Learning: Unused imports in `deepgram/clients/speak/__init__.py` are retained for backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#426
File: deepgram/clients/listen/v1/websocket/__init__.py:8-8
Timestamp: 2024-07-01T19:21:39.778Z
Learning: Unused imports in `deepgram/clients/listen/v1/websocket/__init__.py` are retained to maintain backward compatibility and should not be flagged for removal in reviews.
Learnt from: dvonthenen
PR: deepgram/deepgram-python-sdk#431
File: deepgram/clients/listen/v1/websocket/client.py:30-30
Timestamp: 2024-07-11T14:10:17.231Z
Learning: The `LiveOptions` import in `deepgram/clients/listen/v1/websocket/client.py` is intentionally present for future use and should not be flagged for removal in reviews.
Ruff
deepgram/clients/speak/__init__.py

16-16: .client.SpeakOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


17-17: .client.SpeakRESTOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


19-19: .client.FileSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


20-20: .client.SpeakRestSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: .client.SpeakSource imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


24-24: .client.SpeakResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


25-25: .client.SpeakRESTResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

deepgram/clients/speak/v1/__init__.py

18-18: ....options.DeepgramClientOptions imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


18-18: ....options.ClientOptionsFromEnv imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: .rest.SpeakRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


21-21: .rest.AsyncSpeakRESTClient imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)


23-23: .rest.SpeakRESTResponse imported but unused; consider removing, adding to __all__, or using a redundant alias

(F401)

Additional comments not posted (15)
deepgram/clients/speak/__init__.py (3)

12-13: Commented out WebSocket client imports.

The imports for SpeakWebSocketClient and AsyncSpeakWebSocketClient have been commented out. This aligns with the PR's objective to temporarily remove the TTS WebSocket implementation.


18-18: Commented out WebSocket options import.

The import for SpeakWebSocketOptions has been commented out, consistent with the removal of the TTS WebSocket implementation.


26-33: Commented out WebSocket response imports.

The imports for various WebSocket response types have been commented out. This is consistent with the temporary removal of the TTS WebSocket functionality.

deepgram/clients/speak/v1/__init__.py (2)

15-17: Commented out WebSocket options imports.

The imports for SpeakWebSocketOptions have been commented out, consistent with the removal of the TTS WebSocket implementation.


25-36: Commented out WebSocket client and response imports.

The imports for SpeakWebSocketClient, AsyncSpeakWebSocketClient, and various WebSocket response types have been commented out. This aligns with the PR's objective to temporarily remove the TTS WebSocket implementation.

deepgram/clients/speak/client.py (6)

8-9: Commented out WebSocket client imports.

The imports for SpeakWebSocketClient and AsyncSpeakWebSocketClient have been commented out. This aligns with the PR's objective to temporarily remove the TTS WebSocket implementation.


14-14: Commented out WebSocket options import.

The import for SpeakWebSocketOptions has been commented out, consistent with the removal of the TTS WebSocket implementation.


21-28: Commented out WebSocket response imports.

The imports for various WebSocket response types have been commented out. This is consistent with the temporary removal of the TTS WebSocket functionality.


38-38: Commented out WebSocket options declaration.

The declaration for SpeakWebSocketOptions has been commented out, consistent with the removal of the TTS WebSocket implementation.


45-52: Commented out WebSocket response declarations.

The declarations for various WebSocket response types have been commented out. This aligns with the PR's objective to temporarily remove the TTS WebSocket implementation.


62-63: Commented out WebSocket client declarations.

The declarations for SpeakWebSocketClient and AsyncSpeakWebSocketClient have been commented out. This is consistent with the temporary removal of the TTS WebSocket functionality.

deepgram/clients/__init__.py (2)

108-108: Commented out WebSocket options import.

The import for SpeakWebSocketOptions has been commented out, consistent with the removal of the TTS WebSocket implementation.


128-142: Commented out WebSocket client and response imports.

The imports for SpeakWebSocketClient, AsyncSpeakWebSocketClient, and various WebSocket response types have been commented out. This aligns with the PR's objective to temporarily remove the TTS WebSocket implementation.

deepgram/__init__.py (2)

99-99: Verify the temporary removal of SpeakWebSocketOptions.

The SpeakWebSocketOptions import is commented out, which aligns with the PR objectives of temporarily removing the TTS WebSocket implementation.

Ensure that this change is temporary and will be reintroduced in a subsequent pull request as mentioned in the PR description.


118-132: Verify the temporary removal of WebSocket-related imports and declarations.

The WebSocket-related imports and declarations are commented out, which aligns with the PR objectives of temporarily removing the TTS WebSocket implementation.

Ensure that these changes are temporary and will be reintroduced in a subsequent pull request as mentioned in the PR description.

@davidvonthenen davidvonthenen merged commit 9cb2372 into deepgram:main Jul 15, 2024
3 checks passed
@davidvonthenen davidvonthenen deleted the revert-tts-ws-temporarily branch July 15, 2024 17:46
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