Skip to content

Commit

Permalink
Added \n back to docstrings for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mews committed Jun 8, 2024
1 parent 807ec9d commit b3105fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Binary file modified docs/build/doctrees/environment.pickle
Binary file not shown.
24 changes: 12 additions & 12 deletions src/simplestretch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,26 @@ def stretch_audio(
output: Optional[str] = None,
samplerate: Optional[int] = None,
) -> Tuple[ndarray, int]:
"""This function is used to stretch an audio's length by a certain factor.
"""This function is used to stretch an audio's length by a certain factor.\n
Because this function doesn't apply any resampling or similar algorithms, for very high factors (around 5 or higher) the audio quality might decrease noticeably.
:param audio: The audio to be stretched.
:param audio: The audio to be stretched.\n
You can provide either a path to a file containing your audio, or the raw sound data as a numpy ndarray.
:type audio: str | numpy.ndarray
:param factor: This is the factor by which the length of the audio will be changed.
:param factor: This is the factor by which the length of the audio will be changed.\n
For example, a factor of 2 will make the audio twice as long, and a factor of 0.5 will make the audio half as long.
:type factor: float
:param output: This is the path to which the stretched audio will be saved.
:param output: This is the path to which the stretched audio will be saved.\n
If no argument is passed, it wont save the audio to a file.
:type output: str, optional
:param samplerate: The sample rate of the original audio.
:param samplerate: The sample rate of the original audio.\n
You only need to pass this argument if you've provided a numpy ndarray as the audio. Otherwise, it will be determined automatically.
:type samplerate: int, optional
:return: A tuple containing the stretched audio data and sample rate.
:return: A tuple containing the stretched audio data and sample rate.\n
This is returned whether or not the audio gets saved to a file.
:rtype: Tuple[ndarray, int]
Expand Down Expand Up @@ -64,26 +64,26 @@ def speedup_audio(
output: Optional[str] = None,
samplerate: Optional[int] = None,
) -> Tuple[ndarray, int]:
"""This function is used to change an audio's speed by a certain factor.
"""This function is used to change an audio's speed by a certain factor.\n
Because this function doesn't apply any resampling or similar algorithms, for very low factors (around 0.2 or lower) the audio quality might decrease noticeably.
:param audio: The audio to be sped up or down.
:param audio: The audio to be sped up or down.\n
You can provide either a path to a file containing your audio, or the raw sound data as a numpy ndarray.
:type audio: str | numpy.ndarray
:param factor: This is the factor by which the speed of the audio will be changed.
:param factor: This is the factor by which the speed of the audio will be changed.\n
For example, a factor of 2 will make the audio twice as fast, and a factor of 0.5 will make the audio half as fast.
:type factor: float
:param output: This is the path to which the sped up audio will be saved.
:param output: This is the path to which the sped up audio will be saved.\n
If no argument is passed, it wont save the audio to a file.
:type output: str, optional
:param samplerate: The sample rate of the original audio.
:param samplerate: The sample rate of the original audio.\n
You only need to pass this argument if you've provided a numpy ndarray as the audio. Otherwise, it will be determined automatically.
:type samplerate: int, optional
:return: A tuple containing the sped up audio data and sample rate.
:return: A tuple containing the sped up audio data and sample rate.\n
This is returned whether or not the audio gets saved to a file.
:rtype: Tuple[ndarray, int]
Expand Down

0 comments on commit b3105fb

Please sign in to comment.