diff --git a/docs/build/doctrees/environment.pickle b/docs/build/doctrees/environment.pickle index 2e0bf2a..8e23784 100644 Binary files a/docs/build/doctrees/environment.pickle and b/docs/build/doctrees/environment.pickle differ diff --git a/src/simplestretch/__init__.py b/src/simplestretch/__init__.py index f13420a..0c40d33 100644 --- a/src/simplestretch/__init__.py +++ b/src/simplestretch/__init__.py @@ -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] @@ -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]