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

Added Docstrings for the classes and functions #58

Merged
merged 2 commits into from
Nov 9, 2022

Conversation

dotAadarsh
Copy link
Contributor

@geekchick Please review it and share your feedback.
#55

Copy link
Contributor

@geekchick geekchick left a comment

Choose a reason for hiding this comment

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

Great job on adding the docstrings! The only ask I have is to remove all instances of :param self in the docstrings.

"""
This function initializes the options and transcription_options for the PrerecordedTranscription class.

:param self: Used to Refer to the object itself.
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we remove this line: :param self: Used to Refer to the object itself. from the docstring. Otherwise, really great job on this task!


prerecorded_transcription = PrerecordedTranscription(...)

:param self: Used to Access the class attributes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from the docstring :param self: Used to Access the class attributes.

accessed using "self." notation. In this case, it sets up a list to store any
messages received from Transcribe Streaming.

:param self: Used to Reference the object instance of the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from docstring :param self: Used to Reference the object instance of the class.

transcription process. It returns itself after starting so that operations can
be chained.

:param self: Used to Access the attributes of the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from docstring :param self: Used to Access the attributes of the class.

_start function will run until it receives a message with an empty transcription,
at which point it will close the socket and return.

:param self: Used to Access the class attributes.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from docstring :param self: Used to Access the class attributes.

It is started by calling start_receiver() on an instance of AsyncSocket. It runs until the socket is closed,
or until an exception occurs.

:param self: Used to Access the attributes of the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from docstring :param self: Used to Access the attributes of the class.

transcription service sends a ping event. It calls all of the functions
in self.handlers, which are registered by calling add_ping_handler().

:param self: Used to Access the attributes and methods of the class.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove this line from docstring :param self: Used to Access the attributes and methods of the class.

Copy link
Contributor Author

@dotAadarsh dotAadarsh left a comment

Choose a reason for hiding this comment

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

Removed the :param self: as requested.

@geekchick geekchick removed the request for review from michaeljolley November 9, 2022 23:30
@geekchick geekchick merged commit 134ee8c into deepgram:main Nov 9, 2022
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.

3 participants