diff --git a/.buildinfo b/.buildinfo index 963e068..ade937c 100644 --- a/.buildinfo +++ b/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: b201529e79aae5fdf2e6626e37e9091e +config: 2482da82aa430d690918cff7dfeb34b2 tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/.doctrees/api/audiofile.read.doctree b/.doctrees/api/audiofile.read.doctree index 129f17c..2469720 100644 Binary files a/.doctrees/api/audiofile.read.doctree and b/.doctrees/api/audiofile.read.doctree differ diff --git a/.doctrees/changelog.doctree b/.doctrees/changelog.doctree index 08b6a18..1b41898 100644 Binary files a/.doctrees/changelog.doctree and b/.doctrees/changelog.doctree differ diff --git a/.doctrees/environment.pickle b/.doctrees/environment.pickle index 7319293..3d681a4 100644 Binary files a/.doctrees/environment.pickle and b/.doctrees/environment.pickle differ diff --git a/_images/audiofile-read-2.png b/_images/audiofile-read-2.png index 1752117..407b297 100644 Binary files a/_images/audiofile-read-2.png and b/_images/audiofile-read-2.png differ diff --git a/_images/audiofile-read-3.png b/_images/audiofile-read-3.png index fd57470..9d871d3 100644 Binary files a/_images/audiofile-read-3.png and b/_images/audiofile-read-3.png differ diff --git a/_images/audiofile-read-4.png b/_images/audiofile-read-4.png index 19284f1..f38d50c 100644 Binary files a/_images/audiofile-read-4.png and b/_images/audiofile-read-4.png differ diff --git a/_images/audiofile-read-5.png b/_images/audiofile-read-5.png index d476a80..9bdbec2 100644 Binary files a/_images/audiofile-read-5.png and b/_images/audiofile-read-5.png differ diff --git a/_images/audiofile-read-6.png b/_images/audiofile-read-6.png index 71dc9b0..e3b382f 100644 Binary files a/_images/audiofile-read-6.png and b/_images/audiofile-read-6.png differ diff --git a/_modules/audiofile/core/info.html b/_modules/audiofile/core/info.html index 54461ae..4612b73 100644 --- a/_modules/audiofile/core/info.html +++ b/_modules/audiofile/core/info.html @@ -66,7 +66,7 @@
- v1.5.0 + v1.5.1
@@ -142,10 +142,12 @@

Source code for audiofile.core.info

 """Read, write, and get information about audio files."""
+
+from __future__ import annotations
+
 import os
 import subprocess
 import tempfile
-import typing
 
 import soundfile
 
@@ -159,7 +161,7 @@ 

Source code for audiofile.core.info

 from audiofile.core.utils import run
 
 
-
[docs]def bit_depth(file: str) -> typing.Optional[int]: +
[docs]def bit_depth(file: str) -> int | None: r"""Bit depth of audio file. For lossy audio files, @@ -461,7 +463,7 @@

Source code for audiofile.core.info

         
         
         
-          Built with Sphinx on 2024/07/26 using the audEERING theme
+          Built with Sphinx on 2025/01/03 using the audEERING theme
         
     

@@ -469,7 +471,7 @@

Source code for audiofile.core.info

   

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/_modules/audiofile/core/io.html b/_modules/audiofile/core/io.html index 5579fdb..7aeb979 100644 --- a/_modules/audiofile/core/io.html +++ b/_modules/audiofile/core/io.html @@ -66,7 +66,7 @@
- v1.5.0 + v1.5.1
@@ -141,9 +141,10 @@

Source code for audiofile.core.io

-import os
+from __future__ import annotations
+
+import os
 import tempfile
-import typing
 
 import numpy as np
 import soundfile
@@ -161,8 +162,8 @@ 

Source code for audiofile.core.io

 
[docs]def convert_to_wav( infile: str, outfile: str = None, - offset: typing.Union[float, int, str, np.timedelta64] = None, - duration: typing.Union[float, int, str, np.timedelta64] = None, + offset: float | int | str | np.timedelta64 = None, + duration: float | int | str | np.timedelta64 = None, bit_depth: int = 16, normalize: bool = False, overwrite: bool = False, @@ -265,12 +266,12 @@

Source code for audiofile.core.io

 
 
[docs]def read( file: str, - duration: typing.Union[float, int, str, np.timedelta64] = None, - offset: typing.Union[float, int, str, np.timedelta64] = None, + duration: float | int | str | np.timedelta64 = None, + offset: float | int | str | np.timedelta64 = None, always_2d: bool = False, dtype: str = "float32", **kwargs, -) -> typing.Tuple[np.array, int]: +) -> tuple[np.array, int]: """Read audio file. It uses :func:`soundfile.read` for WAV, FLAC, MP3, and OGG files. @@ -396,6 +397,7 @@

Source code for audiofile.core.io

 
     """  # noqa: E501
     file = audeer.safe_path(file)
+    sampling_rate = None
 
     # Parse offset and duration values
     if (
@@ -519,9 +521,6 @@ 

Source code for audiofile.core.io

         # the returned magnitude
         # (https://github.com/librosa/librosa/issues/811).
         #
-        # It might be the case that MP3 files will be supported by soundfile in
-        # the future as well. For a discussion on MP3 support in the underlying
-        # libsndfile see https://github.com/erikd/libsndfile/issues/258.
         with tempfile.TemporaryDirectory(prefix="audiofile") as tmpdir:
             tmpfile = os.path.join(tmpdir, "tmp.wav")
             # offset and duration have to be given in seconds
@@ -529,7 +528,16 @@ 

Source code for audiofile.core.io

                 offset /= sampling_rate
             if duration is not None and duration != 0:
                 duration /= sampling_rate
-            convert(file, tmpfile, offset, duration)
+            if sampling_rate is None:
+                # Infer sampling rate using mediainfo before conversion,
+                # as ffmpeg does ignore the original sampling rate for opus files,
+                # see:
+                # * https://trac.ffmpeg.org/ticket/5240
+                # * https://github.com/audeering/audiofile/issues/157
+                from audiofile.core.info import sampling_rate as get_sampling_rate
+
+                sampling_rate = get_sampling_rate(file)
+            convert(file, tmpfile, offset, duration, sampling_rate)
             signal, sampling_rate = soundfile.read(
                 tmpfile,
                 dtype=dtype,
@@ -658,7 +666,7 @@ 

Source code for audiofile.core.io

         
         
         
-          Built with Sphinx on 2024/07/26 using the audEERING theme
+          Built with Sphinx on 2025/01/03 using the audEERING theme
         
     

@@ -666,7 +674,7 @@

Source code for audiofile.core.io

   

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/_modules/index.html b/_modules/index.html index 2fa5415..f8401f4 100644 --- a/_modules/index.html +++ b/_modules/index.html @@ -66,7 +66,7 @@
- v1.5.0 + v1.5.1
@@ -157,7 +157,7 @@

All modules for which code is available

- Built with Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -165,7 +165,7 @@

All modules for which code is available

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.bit_depth.html b/api/audiofile.bit_depth.html index aa29c48..f03eff9 100644 --- a/api/audiofile.bit_depth.html +++ b/api/audiofile.bit_depth.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -164,16 +164,16 @@

bit_depth()None is returned as they have a varying bit depth.

Parameters
-

file (str) – file name of input audio file

+

file (str) – file name of input audio file

Return type
-

Optional[int]

+

Optional[int]

Returns

bit depth of audio file

Raises
-

RuntimeError – if file is missing, +

RuntimeError – if file is missing, broken or format is not supported

@@ -209,7 +209,7 @@

bit_depth()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -217,7 +217,7 @@

bit_depth()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.channels.html b/api/audiofile.channels.html index e5282c3..6568ba4 100644 --- a/api/audiofile.channels.html +++ b/api/audiofile.channels.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -162,19 +162,19 @@

channels()
Parameters
-

file (str) – file name of input audio file

+

file (str) – file name of input audio file

Return type
-

int

+

int

Returns

number of channels in audio file

Raises
@@ -211,7 +211,7 @@

channels()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -219,7 +219,7 @@

channels()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.convert_to_wav.html b/api/audiofile.convert_to_wav.html index 16001da..3d29903 100644 --- a/api/audiofile.convert_to_wav.html +++ b/api/audiofile.convert_to_wav.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -191,35 +191,35 @@

convert_to_wav()
Parameters
    -
  • infile (str) – audio/video file name

  • -
  • outfile (Optional[str]) – WAV file name. +

  • infile (str) – audio/video file name

  • +
  • outfile (Optional[str]) – WAV file name. If None same path as infile but file extension is replaced by 'wav'

  • -
  • duration (Union[float, int, str, timedelta64, None]) – return only a specified duration

  • -
  • offset (Union[float, int, str, timedelta64, None]) – start reading at offset

  • -
  • bit_depth (int) – bit depth of written file in bit, +

  • duration (Union[float, int, str, timedelta64, None]) – return only a specified duration

  • +
  • offset (Union[float, int, str, timedelta64, None]) – start reading at offset

  • +
  • bit_depth (int) – bit depth of written file in bit, can be 8, 16, 24

  • -
  • normalize (bool) – normalize audio data before writing

  • -
  • overwrite (bool) – force overwriting +

  • normalize (bool) – normalize audio data before writing

  • +
  • overwrite (bool) – force overwriting if outfile is identical to outfile

  • kwargs – pass on further arguments to soundfile.write()

Return type
-

str

+

str

Returns

absolute path to resulting WAV file

Raises
    -
  • FileNotFoundError – if ffmpeg binary is needed, +

  • FileNotFoundError – if ffmpeg binary is needed, but cannot be found

  • -
  • RuntimeError – if file is missing, +

  • RuntimeError – if file is missing, broken or format is not supported

  • -
  • RuntimeError – if infile would need to be overwritten +

  • RuntimeError – if infile would need to be overwritten and overwrite is False

  • -
  • ValueError – if duration is a string +

  • ValueError – if duration is a string that does not match a valid ‘<value><unit>’ pattern or the provided unit is not supported

@@ -258,7 +258,7 @@

convert_to_wav()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -266,7 +266,7 @@

convert_to_wav()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.duration.html b/api/audiofile.duration.html index 223787f..12d416d 100644 --- a/api/audiofile.duration.html +++ b/api/audiofile.duration.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -180,22 +180,22 @@

duration()
Parameters
    -
  • file (str) – file name of input audio file

  • +
  • file (str) – file name of input audio file

  • sloppy – if True report duration as stored in the header

Return type
-

float

+

float

Returns

duration in seconds of audio file

Raises
@@ -232,7 +232,7 @@

duration()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -240,7 +240,7 @@

duration()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.has_video.html b/api/audiofile.has_video.html index 436cd05..8d8c5c8 100644 --- a/api/audiofile.has_video.html +++ b/api/audiofile.has_video.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -165,19 +165,19 @@

has_video()
Parameters
-

file (str) – file name of input file

+

file (str) – file name of input file

Return type
-

bool

+

bool

Returns

True if file contains video data

Raises
@@ -214,7 +214,7 @@

has_video()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -222,7 +222,7 @@

has_video()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.html b/api/audiofile.html index 3b06404..07c18c1 100644 --- a/api/audiofile.html +++ b/api/audiofile.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -216,7 +216,7 @@ - Built with
Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -224,7 +224,7 @@

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.read.html b/api/audiofile.read.html index 0319730..a43f22e 100644 --- a/api/audiofile.read.html +++ b/api/audiofile.read.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -187,12 +187,12 @@

read()
Parameters
    -
  • file (str) – file name of input audio file

  • -
  • duration (Union[float, int, str, timedelta64, None]) – return only the specified duration

  • -
  • offset (Union[float, int, str, timedelta64, None]) – start reading at offset

  • -
  • always_2d (bool) – if True it always returns a two-dimensional signal +

  • file (str) – file name of input audio file

  • +
  • duration (Union[float, int, str, timedelta64, None]) – return only the specified duration

  • +
  • offset (Union[float, int, str, timedelta64, None]) – start reading at offset

  • +
  • always_2d (bool) – if True it always returns a two-dimensional signal even for mono sound files

  • -
  • dtype (str) – data type of returned signal, +

  • dtype (str) – data type of returned signal, select from 'float64', 'float32', @@ -202,7 +202,7 @@

    read()

Return type
-

Tuple[array, int]

+

tuple[array, int]

Returns

    @@ -217,11 +217,11 @@

    read()

Raises
    -
  • FileNotFoundError – if ffmpeg binary is needed, +

  • FileNotFoundError – if ffmpeg binary is needed, but cannot be found

  • -
  • RuntimeError – if file is missing, +

  • RuntimeError – if file is missing, broken or format is not supported

  • -
  • ValueError – if duration is a string +

  • ValueError – if duration is a string that does not match a valid ‘<value><unit>’ pattern or the provided unit is not supported

@@ -315,7 +315,7 @@

read() - Built with Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -323,7 +323,7 @@

read()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.samples.html b/api/audiofile.samples.html index 28c9101..6b76d51 100644 --- a/api/audiofile.samples.html +++ b/api/audiofile.samples.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -165,19 +165,19 @@

samples()
Parameters
-

file (str) – file name of input audio file

+

file (str) – file name of input audio file

Return type
-

int

+

int

Returns

number of samples in audio file

Raises
@@ -214,7 +214,7 @@

samples()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -222,7 +222,7 @@

samples()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.sampling_rate.html b/api/audiofile.sampling_rate.html index ae00f0f..eeec2a6 100644 --- a/api/audiofile.sampling_rate.html +++ b/api/audiofile.sampling_rate.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -162,19 +162,19 @@

sampling_rate()
Parameters
-

file (str) – file name of input audio file

+

file (str) – file name of input audio file

Return type
-

int

+

int

Returns

sampling rate of audio file

Raises
@@ -211,7 +211,7 @@

sampling_rate()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -219,7 +219,7 @@

sampling_rate()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/api/audiofile.write.html b/api/audiofile.write.html index 69927d4..24bc0f6 100644 --- a/api/audiofile.write.html +++ b/api/audiofile.write.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -172,19 +172,19 @@

write()
Parameters
    -
  • file (str) – file name of output audio file. +

  • file (str) – file name of output audio file. The format (WAV, FLAC, MP3, OGG) will be inferred from the file name

  • signal (array) – audio data to write

  • -
  • sampling_rate (int) – sample rate of the audio data

  • -
  • bit_depth (int) – bit depth of written file in bit, +

  • sampling_rate (int) – sample rate of the audio data

  • +
  • bit_depth (int) – bit depth of written file in bit, can be 8, 16, 24 for WAV and FLAC files, and in addition 32 for WAV files

  • -
  • normalize (bool) – normalize audio data before writing

  • +
  • normalize (bool) – normalize audio data before writing

  • kwargs – pass on further arguments to soundfile.write()

Raises
-

RuntimeError – for non-supported bit depth or number of channels

+

RuntimeError – for non-supported bit depth or number of channels

Examples

@@ -222,7 +222,7 @@

write()Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -230,7 +230,7 @@

write()

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/benchmark.html b/benchmark.html index b14b054..1d51b14 100644 --- a/benchmark.html +++ b/benchmark.html @@ -68,7 +68,7 @@
- v1.5.0 + v1.5.1
@@ -295,7 +295,7 @@

Accessing metadataSphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

@@ -303,7 +303,7 @@

Accessing metadata

- © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

diff --git a/changelog.html b/changelog.html index 65d9aeb..8a3e1b8 100644 --- a/changelog.html +++ b/changelog.html @@ -67,7 +67,7 @@
- v1.5.0 + v1.5.1
@@ -105,6 +105,7 @@
  • Contributing
  • Changelog
      +
    • Version 1.5.1 (2025-01-03)
    • Version 1.5.0 (2024-07-26)
    • Version 1.4.0 (2024-01-30)
    • Version 1.3.2 (2023-12-05)
    • @@ -179,6 +180,18 @@

      ChangelogKeep a Changelog, and this project adheres to Semantic Versioning.

      +
      +

      Version 1.5.1 (2025-01-03)¶

      +
        +
      • Added: support for Python 3.13

      • +
      • Changed: when converting +a non wav, flac, ogg, or mp3 file to wav, +its sampling rate is first inspected +and then enforced during conversion

      • +
      • Fixed: reading of opus files with their correct sampling rate

      • +
      • Removed: support for Python 3.8

      • +
      +

      Version 1.5.0 (2024-07-26)¶

      @@ -503,7 +516,7 @@

      Version 0.1.0 (2019-03-25)

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/contributing.html b/contributing.html index c48d38d..49343e7 100644 --- a/contributing.html +++ b/contributing.html @@ -68,7 +68,7 @@
      - v1.5.0 + v1.5.1
      @@ -273,7 +273,7 @@

      Creating a New ReleaseSphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -281,7 +281,7 @@

      Creating a New Release

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/genindex.html b/genindex.html index 4ff0338..810f535 100644 --- a/genindex.html +++ b/genindex.html @@ -66,7 +66,7 @@
      - v1.5.0 + v1.5.1
      @@ -260,7 +260,7 @@

      W

      - Built with
      Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -268,7 +268,7 @@

      W

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/index.html b/index.html index c901867..7d928e3 100644 --- a/index.html +++ b/index.html @@ -67,7 +67,7 @@
      - v1.5.0 + v1.5.1
      @@ -195,7 +195,7 @@

      audiofileSphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -203,7 +203,7 @@

      audiofile

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/installation.html b/installation.html index 7ed4a7e..4b9f0ea 100644 --- a/installation.html +++ b/installation.html @@ -68,7 +68,7 @@
      - v1.5.0 + v1.5.1
      @@ -186,7 +186,7 @@

      InstallationSphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -194,7 +194,7 @@

      Installation

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/objects.inv b/objects.inv index e4c7321..97da778 100644 --- a/objects.inv +++ b/objects.inv @@ -1,6 +1,6 @@ # Sphinx inventory version 2 # Project: audiofile -# Version: v1.5.0 +# Version: v1.5.1 # The remainder of this file is compressed using zlib. xÚ…•Ao„ „ïüŠ—´‡ö`Û½î±=õÐd“¦gƒB•Á(îvÿ}Q¡€{ÙðæÍ|A3ñD˜üfœB=v’Lúô¸gÏØnžZÕñ;³+î¡@Û¦bª$´WíœþžD­˜pø—w.C u‹… |Ü%XS Å™ªT²¼àó>&°¦`dðÝÃXS diff --git a/plot_directive/api/audiofile-read-2.png b/plot_directive/api/audiofile-read-2.png index 1752117..407b297 100644 Binary files a/plot_directive/api/audiofile-read-2.png and b/plot_directive/api/audiofile-read-2.png differ diff --git a/plot_directive/api/audiofile-read-3.png b/plot_directive/api/audiofile-read-3.png index fd57470..9d871d3 100644 Binary files a/plot_directive/api/audiofile-read-3.png and b/plot_directive/api/audiofile-read-3.png differ diff --git a/plot_directive/api/audiofile-read-4.png b/plot_directive/api/audiofile-read-4.png index 19284f1..f38d50c 100644 Binary files a/plot_directive/api/audiofile-read-4.png and b/plot_directive/api/audiofile-read-4.png differ diff --git a/plot_directive/api/audiofile-read-5.png b/plot_directive/api/audiofile-read-5.png index d476a80..9bdbec2 100644 Binary files a/plot_directive/api/audiofile-read-5.png and b/plot_directive/api/audiofile-read-5.png differ diff --git a/plot_directive/api/audiofile-read-6.png b/plot_directive/api/audiofile-read-6.png index 71dc9b0..e3b382f 100644 Binary files a/plot_directive/api/audiofile-read-6.png and b/plot_directive/api/audiofile-read-6.png differ diff --git a/py-modindex.html b/py-modindex.html index fa5d648..97c1e11 100644 --- a/py-modindex.html +++ b/py-modindex.html @@ -73,7 +73,7 @@
      - v1.5.0 + v1.5.1
      @@ -178,7 +178,7 @@

      Python Module Index

      - Built with
      Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -186,7 +186,7 @@

      Python Module Index

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/search.html b/search.html index c9072c5..564ea9a 100644 --- a/search.html +++ b/search.html @@ -66,7 +66,7 @@
      - v1.5.0 + v1.5.1
      @@ -167,7 +167,7 @@ - Built with Sphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -175,7 +175,7 @@

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH

      diff --git a/searchindex.js b/searchindex.js index 420dba5..2f8a54a 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api/audiofile", "api/audiofile.bit_depth", "api/audiofile.channels", "api/audiofile.convert_to_wav", "api/audiofile.duration", "api/audiofile.has_video", "api/audiofile.read", "api/audiofile.samples", "api/audiofile.sampling_rate", "api/audiofile.write", "benchmark", "changelog", "contributing", "index", "installation", "usage"], "filenames": ["api/audiofile.rst", "api/audiofile.bit_depth.rst", "api/audiofile.channels.rst", "api/audiofile.convert_to_wav.rst", "api/audiofile.duration.rst", "api/audiofile.has_video.rst", "api/audiofile.read.rst", "api/audiofile.samples.rst", "api/audiofile.sampling_rate.rst", "api/audiofile.write.rst", "benchmark.rst", "changelog.rst", "contributing.rst", "index.rst", "installation.rst", "usage.rst"], "titles": ["audiofile", "bit_depth()", "channels()", "convert_to_wav()", "duration()", "has_video()", "read()", "samples()", "sampling_rate()", "write()", "Benchmark", "Changelog", "Contributing", "audiofile", "Installation", "Usage"], "terms": {"read": [0, 3, 11, 13], "write": [0, 3, 11, 13], "get": [0, 12, 14, 15], "inform": [0, 4, 10, 13], "about": 0, "audio": [0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 13, 14, 15], "file": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13], "audiofil": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14], "bit": [1, 3, 9, 11], "depth": [1, 3, 9, 11], "For": [1, 5, 9, 10], "lossi": 1, "none": [1, 3, 6, 11], "i": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13], "return": [1, 2, 3, 4, 5, 6, 7, 8, 11, 15], "thei": [1, 3, 6, 10], "have": [1, 4, 10, 13], "vari": 1, "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9], "str": [1, 2, 3, 4, 5, 6, 7, 8, 9], "name": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "input": [1, 2, 4, 5, 6, 7, 8, 11], "type": [1, 2, 3, 4, 5, 6, 7, 8], "option": [1, 3, 14], "int": [1, 2, 3, 6, 7, 8, 9], "rais": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "runtimeerror": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "miss": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "broken": [1, 2, 3, 4, 6, 7, 8, 11], "format": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14], "support": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15], "exampl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13], "stereo": [1, 2, 3, 4, 5, 6, 7, 8, 9], "wav": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15], "16": [1, 3, 9, 15], "number": [2, 3, 7, 9, 10, 13], "filenotfounderror": [2, 3, 4, 5, 6, 7, 8, 11], "mediainfo": [2, 4, 5, 8, 11, 13, 14, 15], "binari": [2, 3, 4, 5, 6, 7, 8, 11], "need": [2, 3, 4, 5, 6, 7, 8, 12, 13], "cannot": [2, 3, 4, 5, 6, 7, 8], "found": [2, 3, 4, 5, 6, 7, 8], "2": [2, 3, 6, 9, 10, 15], "infil": 3, "outfil": 3, "offset": [3, 6, 11, 15], "durat": [3, 6, 10, 11, 13, 15], "bit_depth": [3, 9, 11, 15], "normal": [3, 9, 11, 15], "fals": [3, 4, 5, 6, 9, 11], "overwrit": [3, 11], "kwarg": [3, 6, 9], "convert": [3, 6, 7, 10, 11, 13], "ani": [3, 12, 15], "video": [3, 5, 11], "It": [3, 6, 9, 12, 13], "us": [3, 6, 9, 10, 11, 12, 13, 15], "soundfil": [3, 6, 9, 10, 11, 13], "flac": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "mp3": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "ogg": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "sox": [3, 6, 10, 11, 13, 14, 15], "ffmpeg": [3, 4, 6, 7, 10, 11, 13, 14, 15], "all": [3, 5, 6, 10, 11, 12, 13, 15], "other": [3, 5, 6, 10, 11, 12, 14], "If": [3, 4, 5, 6, 12, 15], "ar": [3, 5, 6, 7, 10, 11, 12, 13, 14, 15], "specifi": [3, 6, 11], "result": [3, 4, 10, 11], "shorten": 3, "accordingli": 3, "mention": [3, 6, 11], "audmath": [3, 6, 11], "duration_in_second": [3, 6, 11], "like": [3, 6, 11], "m": [3, 6, 12, 15], "pd": [3, 6], "to_timedelta": [3, 6], "": [3, 6, 15], "The": [3, 4, 6, 9, 10, 11, 12, 13], "except": [3, 6, 12], "float": [3, 4, 6], "integ": [3, 6], "valu": [3, 6, 11], "alwai": [3, 6, 11, 12], "interpret": [3, 6], "second": [3, 4, 6, 10], "string": [3, 6], "without": [3, 6, 11], "unit": [3, 6, 11], "sampl": [3, 4, 6, 8, 9, 10, 11, 13, 15], "neg": [3, 6, 11], "from": [3, 6, 9, 10, 11, 12, 15], "right": [3, 6], "left": [3, 6], "wherea": [3, 6, 10], "start": [3, 6, 10, 13], "end": [3, 5, 6], "signal": [3, 6, 9, 13, 15], "shorter": [3, 6], "than": [3, 6], "request": [3, 6, 10, 12, 13], "onli": [3, 6, 10, 11], "part": [3, 6], "overlap": [3, 6], "e": [3, 4, 6, 12, 14], "g": [3, 4, 6, 12, 14], "contain": [3, 5, 6, 10, 11, 15], "0": [3, 6, 10, 15], "1": [3, 4, 6, 9, 10, 15], "4": [3, 6, 10, 15], "evenli": [3, 6, 11], "round": [3, 6, 11], "after": [3, 6, 11], "convers": [3, 6], "which": [3, 11], "limit": 3, "channel": [3, 6, 9, 10, 13, 15], "65535": [3, 9], "same": [3, 11, 13], "path": [3, 11], "extens": [3, 11], "replac": [3, 11], "union": [3, 6], "timedelta64": [3, 6], "written": [3, 9], "can": [3, 9, 10, 11, 12, 13, 15], "8": [3, 9, 10], "24": [3, 9], "bool": [3, 5, 6, 9], "data": [3, 5, 6, 9, 10], "befor": [3, 7, 9], "forc": 3, "ident": [3, 11], "pass": [3, 6, 9], "further": [3, 6, 9], "argument": [3, 6, 9, 10, 11], "absolut": 3, "would": 3, "overwritten": 3, "valueerror": [3, 6], "doe": [3, 5, 6, 11, 15], "match": [3, 4, 6, 13], "valid": [3, 6, 12], "pattern": [3, 6], "provid": [3, 4, 6, 9, 11], "o": 3, "basenam": [3, 15], "sloppi": [4, 10, 11], "default": 4, "behavior": 4, "ensur": [4, 11, 13], "one": [4, 6, 9], "To": [4, 10, 12, 14], "achiev": [4, 10, 15], "thi": [4, 10, 11, 12], "first": [4, 6, 7, 10, 11, 13, 15], "decod": [4, 10, 13], "mp4": [4, 10, 11], "you": [4, 10, 12, 15], "differ": [4, 10, 11], "machin": [4, 10], "might": 4, "case": [4, 10], "true": [4, 5, 6, 9, 10, 11, 15], "report": 4, "header": [4, 10], "faster": [4, 11], "still": [4, 12], "depend": [4, 10, 11], "instal": [4, 10, 11, 13], "softwar": 4, "fall": 4, "back": 4, "store": 4, "5": [4, 6, 15], "probe": [5, 11], "always_2d": [6, 15], "dtype": [6, 11], "float32": 6, "two": 6, "dimension": [6, 9], "even": [6, 12], "mono": [6, 9], "sound": 6, "select": 6, "float64": 6, "int32": 6, "int16": 6, "tupl": 6, "arrai": [6, 9, 10], "form": 6, "ha": 6, "rate": [6, 8, 9, 10, 13, 15], "sampling_r": [6, 9, 13, 15], "8000": [6, 8, 9, 15], "shape": [6, 9, 15], "12000": [6, 7], "import": [6, 13, 15], "audplot": 6, "waveform": 6, "extend": 6, "origin": 6, "length": [6, 10], "np": [6, 9, 15], "pad": 6, "4000": 6, "audresampl": [6, 11, 15], "resampl": [6, 11], "remix": [6, 11], "target_r": [6, 15], "16000": [6, 15], "24000": 6, "mixdown": 6, "count": 7, "save": 9, "an": [9, 10, 11, 12, 15], "np3": 9, "up": [9, 10, 11, 12], "255": 9, "monaur": 9, "output": [9, 11], "infer": 9, "addit": [9, 12, 13, 15], "32": 9, "non": [9, 11, 13], "random": [9, 15], "uniform": 9, "1000": 9, "we": [10, 12], "sever": [10, 11], "librari": [10, 11], "against": 10, "each": [10, 11], "follow": [10, 11, 12], "python_audio_loading_benchmark": 10, "project": [10, 11, 12], "load": 10, "160": 10, "singl": [10, 11], "measur": 10, "time": [10, 12], "until": 10, "numpi": [10, 15], "44100": 10, "hz": [10, 15], "white": 10, "nois": [10, 15], "gener": [10, 12], "between": 10, "151": 10, "10": 10, "step": [10, 12], "includ": [10, 11], "per": 10, "lead": 10, "overal": 10, "were": 10, "audioread": 10, "3": 10, "librosa": 10, "pedalboard": [10, 11], "7": [10, 11], "scipi": 10, "11": 10, "12": 10, "test": [10, 11], "three": 10, "under": [10, 11, 13], "hood": [10, 11, 13], "gstreamer": 10, "mad": 10, "work": 10, "those": [10, 12, 15], "As": 10, "slow": 10, "complic": 10, "wa": 10, "everi": [10, 12], "execut": [10, 12], "cpu": 10, "13th": 10, "gen": 10, "intel": 10, "core": [10, 11], "i7": 10, "1355u": 10, "mt": 10, "st": 10, "ram": 10, "15": 10, "29": 10, "gib": 10, "hard": 10, "drive": 10, "kioxia": 10, "kxg8aznv1t02": 10, "linux": 10, "ubuntu": 10, "22": 10, "04": 10, "rerun": 10, "yourself": 10, "clone": [10, 12], "repositori": [10, 12], "cd": [10, 12], "doc": [10, 11, 12], "bash": [10, 11], "install_depend": 10, "sh": 10, "generate_audio": 10, "requir": [10, 11, 12], "ask": 10, "sudo": [10, 14], "password": 10, "apt": [10, 14], "when": [10, 11, 13], "meant": 10, "similar": 10, "them": 10, "been": 10, "remov": [10, 11], "take": 10, "around": 10, "003": 10, "012": 10, "veri": 10, "fast": 10, "main": 10, "focu": [10, 13], "speed": [10, 11, 13], "consist": 10, "process": [10, 11], "set": 10, "tri": 10, "shown": 10, "figur": 10, "do": 10, "maco": [10, 11], "notabl": 11, "chang": [11, 12], "document": 11, "base": 11, "keep": 11, "adher": 11, "semant": 11, "ad": 11, "has_video": 11, "now": [11, 15], "creat": [11, 14, 15], "2x": 11, "increas": 11, "access": 11, "metadata": [11, 15], "1000x": 11, "updat": [11, 12], "benchmark": 11, "page": [11, 12], "latest": [11, 12], "fix": [11, 12], "python": [11, 12, 13, 14], "section": 11, "avoid": 11, "deprec": 11, "warn": 11, "pkg_resourc": 11, "intern": 11, "importlib": 11, "aubio": 11, "convert_to_wav": [11, 15], "snd": 11, "behav": 11, "independ": 11, "incom": 11, "pytest": [11, 12], "txt": [11, 12], "api": 11, "how": 11, "most": 11, "deriv": 11, "call": [11, 12], "mka": 11, "window": 11, "network": 11, "share": 11, "split": 11, "sub": 11, "function": 11, "pysox": 11, "instead": [11, 12], "error": [11, 12], "improv": [11, 12], "messag": 11, "expect": 11, "6": 11, "empti": 11, "wrong": 11, "9": 11, "systemexit": 11, "precis": 11, "make": [11, 12, 14], "keyword": 11, "avail": [11, 12, 15], "allow": 11, "usag": [11, 13], "handl": [11, 13, 14], "audeer": [11, 12, 15], "safe_path": 11, "typo": 11, "more": 11, "code": [11, 13], "coverag": 11, "100": 11, "link": [11, 12], "readm": 11, "multi": 11, "line": 11, "releas": 11, "github": [11, 12], "copi": 11, "button": 11, "publish": 11, "structur": 11, "action": 11, "automat": [11, 12], "host": 11, "pypi": [11, 12], "server": 11, "catch": 11, "soxierror": 11, "advanc": 11, "opu": 11, "amr": 11, "switch": 11, "defin": [11, 12], "packag": [11, 12, 13], "setup": 11, "cfg": 11, "modul": 11, "py": 11, "skip": 11, "download": [11, 14], "fail": 11, "org": 11, "licens": 11, "statement": 11, "public": 11, "everyon": 12, "invit": 12, "feel": 12, "free": 12, "pull": 12, "find": 12, "omiss": 12, "inconsist": 12, "thing": 12, "pleas": [12, 14], "issu": 12, "pip": [12, 14], "should": 12, "newest": 12, "version": 12, "git": 12, "http": 12, "com": 12, "virtual": [12, 14], "environ": [12, 14], "virtualenv": [12, 14], "python3": [12, 14], "home": [12, 14], "env": [12, 14], "bin": [12, 14], "activ": [12, 14], "r": 12, "wai": 12, "your": [12, 14, 15], "stai": 12, "date": 12, "pep8": 12, "ruff": 12, "linter": 12, "formatt": 12, "In": [12, 13, 14, 15], "check": 12, "common": 12, "spell": 12, "codespel": 12, "both": 12, "tool": 12, "possibl": 12, "pyproject": 12, "toml": 12, "ci": 12, "pre": 12, "commit": 12, "enabl": 12, "local": 12, "consid": 12, "system": [12, 14, 15], "wide": 12, "afterward": 12, "also": 12, "directli": [12, 15], "lint": 12, "fixabl": 12, "restrict": 12, "specif": 12, "folder": 12, "audfoo": 12, "re": 12, "html": 12, "sphinx": 12, "few": 12, "necessari": 12, "b": 12, "directori": 12, "linkcheck": 12, "ll": 12, "simpli": 12, "made": 12, "changelog": 12, "rst": 12, "x": 12, "y": 12, "z": 12, "annot": 12, "tag": 12, "push": 12, "kind": 13, "look": 13, "instruct": 13, "point": 13, "approach": 13, "appli": 13, "out": 14, "box": 14, "order": 14, "sure": 14, "run": 14, "let": 15, "dummi": 15, "amax": 15, "ab": 15, "print": 15, "f": 15, "prefer": 15, "workflow": 15, "2d": 15, "dimens": 15, "enforc": 15, "just": 15, "want": 15, "500": 15, "900": 15, "3200": 15, "list_file_nam": 15, "filetyp": 15, "dure": 15, "But": 15, "easili": 15}, "objects": {"": [[0, 0, 0, "-", "audiofile"]], "audiofile": [[1, 1, 1, "", "bit_depth"], [2, 1, 1, "", "channels"], [3, 1, 1, "", "convert_to_wav"], [4, 1, 1, "", "duration"], [5, 1, 1, "", "has_video"], [6, 1, 1, "", "read"], [7, 1, 1, "", "samples"], [8, 1, 1, "", "sampling_rate"], [9, 1, 1, "", "write"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"audiofil": [0, 13], "bit_depth": 1, "channel": 2, "convert_to_wav": 3, "durat": 4, "has_video": 5, "read": [6, 10, 15], "sampl": 7, "sampling_r": 8, "write": [9, 15], "benchmark": 10, "procedur": 10, "audio": 10, "file": [10, 15], "python": 10, "packag": 10, "access": 10, "metadata": 10, "run": [10, 12], "changelog": 11, "version": 11, "1": 11, "5": 11, "0": 11, "2024": 11, "07": 11, "26": 11, "4": 11, "01": 11, "30": 11, "3": 11, "2": 11, "2023": 11, "12": 11, "05": 11, "11": 11, "29": 11, "02": 11, "13": 11, "2022": 11, "22": 11, "04": 11, "14": 11, "03": 11, "2021": 11, "06": 11, "10": 11, "28": 11, "08": 11, "2020": 11, "17": 11, "27": 11, "31": 11, "2019": 11, "25": 11, "contribut": 12, "develop": 12, "instal": [12, 14], "code": 12, "convent": 12, "build": 12, "document": 12, "test": 12, "creat": 12, "new": 12, "releas": 12, "usag": 15, "inform": 15, "convert": 15, "resampl": 15, "remix": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.intersphinx": 1, "sphinx": 57}, "alltitles": {"audiofile": [[0, "module-audiofile"], [13, "audiofile"]], "bit_depth()": [[1, "bit-depth"]], "channels()": [[2, "channels"]], "convert_to_wav()": [[3, "convert-to-wav"]], "duration()": [[4, "duration"]], "has_video()": [[5, "has-video"]], "read()": [[6, "read"]], "samples()": [[7, "samples"]], "sampling_rate()": [[8, "sampling-rate"]], "write()": [[9, "write"]], "Benchmark": [[10, "benchmark"]], "Procedure": [[10, "procedure"]], "Audio files": [[10, "audio-files"]], "Python packages": [[10, "python-packages"]], "Reading files": [[10, "reading-files"], [10, "id1"]], "Accessing metadata": [[10, "accessing-metadata"], [10, "id2"]], "Running the benchmark": [[10, "running-the-benchmark"]], "Changelog": [[11, "changelog"]], "Version 1.5.0 (2024-07-26)": [[11, "version-1-5-0-2024-07-26"]], "Version 1.4.0 (2024-01-30)": [[11, "version-1-4-0-2024-01-30"]], "Version 1.3.2 (2023-12-05)": [[11, "version-1-3-2-2023-12-05"]], "Version 1.3.1 (2023-11-29)": [[11, "version-1-3-1-2023-11-29"]], "Version 1.3.0 (2023-07-12)": [[11, "version-1-3-0-2023-07-12"]], "Version 1.2.1 (2023-02-13)": [[11, "version-1-2-1-2023-02-13"]], "Version 1.2.0 (2023-02-13)": [[11, "version-1-2-0-2023-02-13"]], "Version 1.1.1 (2022-12-22)": [[11, "version-1-1-1-2022-12-22"]], "Version 1.1.0 (2022-04-14)": [[11, "version-1-1-0-2022-04-14"]], "Version 1.0.3 (2022-01-03)": [[11, "version-1-0-3-2022-01-03"]], "Version 1.0.2 (2021-12-06)": [[11, "version-1-0-2-2021-12-06"]], "Version 1.0.1 (2021-10-28)": [[11, "version-1-0-1-2021-10-28"]], "Version 1.0.0 (2021-08-05)": [[11, "version-1-0-0-2021-08-05"]], "Version 0.4.3 (2021-07-30)": [[11, "version-0-4-3-2021-07-30"]], "Version 0.4.2 (2021-04-26)": [[11, "version-0-4-2-2021-04-26"]], "Version 0.4.1 (2020-12-17)": [[11, "version-0-4-1-2020-12-17"]], "Version 0.4.0 (2020-11-26)": [[11, "version-0-4-0-2020-11-26"]], "Version 0.3.4 (2020-10-29)": [[11, "version-0-3-4-2020-10-29"]], "Version 0.3.3 (2020-10-29)": [[11, "version-0-3-3-2020-10-29"]], "Version 0.3.2 (2020-10-29)": [[11, "version-0-3-2-2020-10-29"]], "Version 0.3.1 (2020-10-27)": [[11, "version-0-3-1-2020-10-27"]], "Version 0.3.0 (2020-10-27)": [[11, "version-0-3-0-2020-10-27"]], "Version 0.2.4 (2020-08-31)": [[11, "version-0-2-4-2020-08-31"]], "Version 0.2.3 (2020-08-31)": [[11, "version-0-2-3-2020-08-31"]], "Version 0.2.2 (2019-10-04)": [[11, "version-0-2-2-2019-10-04"]], "Version 0.2.1 (2019-05-02)": [[11, "version-0-2-1-2019-05-02"]], "Version 0.2.0 (2019-05-02)": [[11, "version-0-2-0-2019-05-02"]], "Version 0.1.3 (2019-03-27)": [[11, "version-0-1-3-2019-03-27"]], "Version 0.1.2 (2019-03-25)": [[11, "version-0-1-2-2019-03-25"]], "Version 0.1.1 (2019-03-25)": [[11, "version-0-1-1-2019-03-25"]], "Version 0.1.0 (2019-03-25)": [[11, "version-0-1-0-2019-03-25"]], "Contributing": [[12, "contributing"]], "Development Installation": [[12, "development-installation"]], "Coding Convention": [[12, "coding-convention"]], "Building the Documentation": [[12, "building-the-documentation"]], "Running the Tests": [[12, "running-the-tests"]], "Creating a New Release": [[12, "creating-a-new-release"]], "Installation": [[14, "installation"]], "Usage": [[15, "usage"]], "Write a file": [[15, "write-a-file"]], "File information": [[15, "file-information"]], "Read a file": [[15, "read-a-file"]], "Convert a file": [[15, "convert-a-file"]], "Resample/Remix a file": [[15, "resample-remix-a-file"]]}, "indexentries": {"audiofile": [[0, "module-audiofile"]], "module": [[0, "module-audiofile"]], "bit_depth() (in module audiofile)": [[1, "audiofile.bit_depth"]], "channels() (in module audiofile)": [[2, "audiofile.channels"]], "convert_to_wav() (in module audiofile)": [[3, "audiofile.convert_to_wav"]], "duration() (in module audiofile)": [[4, "audiofile.duration"]], "has_video() (in module audiofile)": [[5, "audiofile.has_video"]], "read() (in module audiofile)": [[6, "audiofile.read"]], "samples() (in module audiofile)": [[7, "audiofile.samples"]], "sampling_rate() (in module audiofile)": [[8, "audiofile.sampling_rate"]], "write() (in module audiofile)": [[9, "audiofile.write"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api/audiofile", "api/audiofile.bit_depth", "api/audiofile.channels", "api/audiofile.convert_to_wav", "api/audiofile.duration", "api/audiofile.has_video", "api/audiofile.read", "api/audiofile.samples", "api/audiofile.sampling_rate", "api/audiofile.write", "benchmark", "changelog", "contributing", "index", "installation", "usage"], "filenames": ["api/audiofile.rst", "api/audiofile.bit_depth.rst", "api/audiofile.channels.rst", "api/audiofile.convert_to_wav.rst", "api/audiofile.duration.rst", "api/audiofile.has_video.rst", "api/audiofile.read.rst", "api/audiofile.samples.rst", "api/audiofile.sampling_rate.rst", "api/audiofile.write.rst", "benchmark.rst", "changelog.rst", "contributing.rst", "index.rst", "installation.rst", "usage.rst"], "titles": ["audiofile", "bit_depth()", "channels()", "convert_to_wav()", "duration()", "has_video()", "read()", "samples()", "sampling_rate()", "write()", "Benchmark", "Changelog", "Contributing", "audiofile", "Installation", "Usage"], "terms": {"read": [0, 3, 11, 13], "write": [0, 3, 11, 13], "get": [0, 12, 14, 15], "inform": [0, 4, 10, 13], "about": 0, "audio": [0, 1, 2, 3, 4, 6, 7, 8, 9, 11, 13, 14, 15], "file": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13], "audiofil": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 14], "bit": [1, 3, 9, 11], "depth": [1, 3, 9, 11], "For": [1, 5, 9, 10], "lossi": 1, "none": [1, 3, 6, 11], "i": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11, 12, 13], "return": [1, 2, 3, 4, 5, 6, 7, 8, 11, 15], "thei": [1, 3, 6, 10], "have": [1, 4, 10, 13], "vari": 1, "paramet": [1, 2, 3, 4, 5, 6, 7, 8, 9], "str": [1, 2, 3, 4, 5, 6, 7, 8, 9], "name": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "input": [1, 2, 4, 5, 6, 7, 8, 11], "type": [1, 2, 3, 4, 5, 6, 7, 8], "option": [1, 3, 14], "int": [1, 2, 3, 6, 7, 8, 9], "rais": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "runtimeerror": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "miss": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "broken": [1, 2, 3, 4, 6, 7, 8, 11], "format": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 13, 14], "support": [1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 13, 14, 15], "exampl": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13], "stereo": [1, 2, 3, 4, 5, 6, 7, 8, 9], "wav": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15], "16": [1, 3, 9, 15], "number": [2, 3, 7, 9, 10, 13], "filenotfounderror": [2, 3, 4, 5, 6, 7, 8, 11], "mediainfo": [2, 4, 5, 8, 11, 13, 14, 15], "binari": [2, 3, 4, 5, 6, 7, 8, 11], "need": [2, 3, 4, 5, 6, 7, 8, 12, 13], "cannot": [2, 3, 4, 5, 6, 7, 8], "found": [2, 3, 4, 5, 6, 7, 8], "2": [2, 3, 6, 9, 10, 15], "infil": 3, "outfil": 3, "offset": [3, 6, 11, 15], "durat": [3, 6, 10, 11, 13, 15], "bit_depth": [3, 9, 11, 15], "normal": [3, 9, 11, 15], "fals": [3, 4, 5, 6, 9, 11], "overwrit": [3, 11], "kwarg": [3, 6, 9], "convert": [3, 6, 7, 10, 11, 13], "ani": [3, 12, 15], "video": [3, 5, 11], "It": [3, 6, 9, 12, 13], "us": [3, 6, 9, 10, 11, 12, 13, 15], "soundfil": [3, 6, 9, 10, 11, 13], "flac": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "mp3": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "ogg": [3, 5, 6, 7, 9, 10, 11, 13, 14, 15], "sox": [3, 6, 10, 11, 13, 14, 15], "ffmpeg": [3, 4, 6, 7, 10, 11, 13, 14, 15], "all": [3, 5, 6, 10, 11, 12, 13, 15], "other": [3, 5, 6, 10, 11, 12, 14], "If": [3, 4, 5, 6, 12, 15], "ar": [3, 5, 6, 7, 10, 11, 12, 13, 14, 15], "specifi": [3, 6, 11], "result": [3, 4, 10, 11], "shorten": 3, "accordingli": 3, "mention": [3, 6, 11], "audmath": [3, 6, 11], "duration_in_second": [3, 6, 11], "like": [3, 6, 11], "m": [3, 6, 12, 15], "pd": [3, 6], "to_timedelta": [3, 6], "": [3, 6, 15], "The": [3, 4, 6, 9, 10, 11, 12, 13], "except": [3, 6, 12], "float": [3, 4, 6], "integ": [3, 6], "valu": [3, 6, 11], "alwai": [3, 6, 11, 12], "interpret": [3, 6], "second": [3, 4, 6, 10], "string": [3, 6], "without": [3, 6, 11], "unit": [3, 6, 11], "sampl": [3, 4, 6, 8, 9, 10, 11, 13, 15], "neg": [3, 6, 11], "from": [3, 6, 9, 10, 11, 12, 15], "right": [3, 6], "left": [3, 6], "wherea": [3, 6, 10], "start": [3, 6, 10, 13], "end": [3, 5, 6], "signal": [3, 6, 9, 13, 15], "shorter": [3, 6], "than": [3, 6], "request": [3, 6, 10, 12, 13], "onli": [3, 6, 10, 11], "part": [3, 6], "overlap": [3, 6], "e": [3, 4, 6, 12, 14], "g": [3, 4, 6, 12, 14], "contain": [3, 5, 6, 10, 11, 15], "0": [3, 6, 10, 15], "1": [3, 4, 6, 9, 10, 15], "4": [3, 6, 10, 15], "evenli": [3, 6, 11], "round": [3, 6, 11], "after": [3, 6, 11], "convers": [3, 6, 11], "which": [3, 11], "limit": 3, "channel": [3, 6, 9, 10, 13, 15], "65535": [3, 9], "same": [3, 11, 13], "path": [3, 11], "extens": [3, 11], "replac": [3, 11], "union": [3, 6], "timedelta64": [3, 6], "written": [3, 9], "can": [3, 9, 10, 11, 12, 13, 15], "8": [3, 9, 10, 11], "24": [3, 9], "bool": [3, 5, 6, 9], "data": [3, 5, 6, 9, 10], "befor": [3, 7, 9], "forc": 3, "ident": [3, 11], "pass": [3, 6, 9], "further": [3, 6, 9], "argument": [3, 6, 9, 10, 11], "absolut": 3, "would": 3, "overwritten": 3, "valueerror": [3, 6], "doe": [3, 5, 6, 11, 15], "match": [3, 4, 6, 13], "valid": [3, 6, 12], "pattern": [3, 6], "provid": [3, 4, 6, 9, 11], "o": 3, "basenam": [3, 15], "sloppi": [4, 10, 11], "default": 4, "behavior": 4, "ensur": [4, 11, 13], "one": [4, 6, 9], "To": [4, 10, 12, 14], "achiev": [4, 10, 15], "thi": [4, 10, 11, 12], "first": [4, 6, 7, 10, 11, 13, 15], "decod": [4, 10, 13], "mp4": [4, 10, 11], "you": [4, 10, 12, 15], "differ": [4, 10, 11], "machin": [4, 10], "might": 4, "case": [4, 10], "true": [4, 5, 6, 9, 10, 11, 15], "report": 4, "header": [4, 10], "faster": [4, 11], "still": [4, 12], "depend": [4, 10, 11], "instal": [4, 10, 11, 13], "softwar": 4, "fall": 4, "back": 4, "store": 4, "5": [4, 6, 15], "probe": [5, 11], "always_2d": [6, 15], "dtype": [6, 11], "float32": 6, "two": 6, "dimension": [6, 9], "even": [6, 12], "mono": [6, 9], "sound": 6, "select": 6, "float64": 6, "int32": 6, "int16": 6, "tupl": 6, "arrai": [6, 9, 10], "form": 6, "ha": 6, "rate": [6, 8, 9, 10, 11, 13, 15], "sampling_r": [6, 9, 13, 15], "8000": [6, 8, 9, 15], "shape": [6, 9, 15], "12000": [6, 7], "import": [6, 13, 15], "audplot": 6, "waveform": 6, "extend": 6, "origin": 6, "length": [6, 10], "np": [6, 9, 15], "pad": 6, "4000": 6, "audresampl": [6, 11, 15], "resampl": [6, 11], "remix": [6, 11], "target_r": [6, 15], "16000": [6, 15], "24000": 6, "mixdown": 6, "count": 7, "save": 9, "an": [9, 10, 11, 12, 15], "np3": 9, "up": [9, 10, 11, 12], "255": 9, "monaur": 9, "output": [9, 11], "infer": 9, "addit": [9, 12, 13, 15], "32": 9, "non": [9, 11, 13], "random": [9, 15], "uniform": 9, "1000": 9, "we": [10, 12], "sever": [10, 11], "librari": [10, 11], "against": 10, "each": [10, 11], "follow": [10, 11, 12], "python_audio_loading_benchmark": 10, "project": [10, 11, 12], "load": 10, "160": 10, "singl": [10, 11], "measur": 10, "time": [10, 12], "until": 10, "numpi": [10, 15], "44100": 10, "hz": [10, 15], "white": 10, "nois": [10, 15], "gener": [10, 12], "between": 10, "151": 10, "10": 10, "step": [10, 12], "includ": [10, 11], "per": 10, "lead": 10, "overal": 10, "were": 10, "audioread": 10, "3": 10, "librosa": 10, "pedalboard": [10, 11], "7": [10, 11], "scipi": 10, "11": 10, "12": 10, "test": [10, 11], "three": 10, "under": [10, 11, 13], "hood": [10, 11, 13], "gstreamer": 10, "mad": 10, "work": 10, "those": [10, 12, 15], "As": 10, "slow": 10, "complic": 10, "wa": 10, "everi": [10, 12], "execut": [10, 12], "cpu": 10, "13th": 10, "gen": 10, "intel": 10, "core": [10, 11], "i7": 10, "1355u": 10, "mt": 10, "st": 10, "ram": 10, "15": 10, "29": 10, "gib": 10, "hard": 10, "drive": 10, "kioxia": 10, "kxg8aznv1t02": 10, "linux": 10, "ubuntu": 10, "22": 10, "04": 10, "rerun": 10, "yourself": 10, "clone": [10, 12], "repositori": [10, 12], "cd": [10, 12], "doc": [10, 11, 12], "bash": [10, 11], "install_depend": 10, "sh": 10, "generate_audio": 10, "requir": [10, 11, 12], "ask": 10, "sudo": [10, 14], "password": 10, "apt": [10, 14], "when": [10, 11, 13], "meant": 10, "similar": 10, "them": 10, "been": 10, "remov": [10, 11], "take": 10, "around": 10, "003": 10, "012": 10, "veri": 10, "fast": 10, "main": 10, "focu": [10, 13], "speed": [10, 11, 13], "consist": 10, "process": [10, 11], "set": 10, "tri": 10, "shown": 10, "figur": 10, "do": 10, "maco": [10, 11], "notabl": 11, "chang": [11, 12], "document": 11, "base": 11, "keep": 11, "adher": 11, "semant": 11, "ad": 11, "python": [11, 12, 13, 14], "its": 11, "inspect": 11, "enforc": [11, 15], "dure": [11, 15], "fix": [11, 12], "opu": 11, "correct": 11, "has_video": 11, "now": [11, 15], "creat": [11, 14, 15], "2x": 11, "increas": 11, "access": 11, "metadata": [11, 15], "1000x": 11, "updat": [11, 12], "benchmark": 11, "page": [11, 12], "latest": [11, 12], "section": 11, "avoid": 11, "deprec": 11, "warn": 11, "pkg_resourc": 11, "intern": 11, "importlib": 11, "aubio": 11, "convert_to_wav": [11, 15], "snd": 11, "behav": 11, "independ": 11, "incom": 11, "pytest": [11, 12], "txt": [11, 12], "api": 11, "how": 11, "most": 11, "deriv": 11, "call": [11, 12], "mka": 11, "window": 11, "network": 11, "share": 11, "split": 11, "sub": 11, "function": 11, "pysox": 11, "instead": [11, 12], "error": [11, 12], "improv": [11, 12], "messag": 11, "expect": 11, "6": 11, "empti": 11, "wrong": 11, "9": 11, "systemexit": 11, "precis": 11, "make": [11, 12, 14], "keyword": 11, "avail": [11, 12, 15], "allow": 11, "usag": [11, 13], "handl": [11, 13, 14], "audeer": [11, 12, 15], "safe_path": 11, "typo": 11, "more": 11, "code": [11, 13], "coverag": 11, "100": 11, "link": [11, 12], "readm": 11, "multi": 11, "line": 11, "releas": 11, "github": [11, 12], "copi": 11, "button": 11, "publish": 11, "structur": 11, "action": 11, "automat": [11, 12], "host": 11, "pypi": [11, 12], "server": 11, "catch": 11, "soxierror": 11, "advanc": 11, "amr": 11, "switch": 11, "defin": [11, 12], "packag": [11, 12, 13], "setup": 11, "cfg": 11, "modul": 11, "py": 11, "skip": 11, "download": [11, 14], "fail": 11, "org": 11, "licens": 11, "statement": 11, "public": 11, "everyon": 12, "invit": 12, "feel": 12, "free": 12, "pull": 12, "find": 12, "omiss": 12, "inconsist": 12, "thing": 12, "pleas": [12, 14], "issu": 12, "pip": [12, 14], "should": 12, "newest": 12, "version": 12, "git": 12, "http": 12, "com": 12, "virtual": [12, 14], "environ": [12, 14], "virtualenv": [12, 14], "python3": [12, 14], "home": [12, 14], "env": [12, 14], "bin": [12, 14], "activ": [12, 14], "r": 12, "wai": 12, "your": [12, 14, 15], "stai": 12, "date": 12, "pep8": 12, "ruff": 12, "linter": 12, "formatt": 12, "In": [12, 13, 14, 15], "check": 12, "common": 12, "spell": 12, "codespel": 12, "both": 12, "tool": 12, "possibl": 12, "pyproject": 12, "toml": 12, "ci": 12, "pre": 12, "commit": 12, "enabl": 12, "local": 12, "consid": 12, "system": [12, 14, 15], "wide": 12, "afterward": 12, "also": 12, "directli": [12, 15], "lint": 12, "fixabl": 12, "restrict": 12, "specif": 12, "folder": 12, "audfoo": 12, "re": 12, "html": 12, "sphinx": 12, "few": 12, "necessari": 12, "b": 12, "directori": 12, "linkcheck": 12, "ll": 12, "simpli": 12, "made": 12, "changelog": 12, "rst": 12, "x": 12, "y": 12, "z": 12, "annot": 12, "tag": 12, "push": 12, "kind": 13, "look": 13, "instruct": 13, "point": 13, "approach": 13, "appli": 13, "out": 14, "box": 14, "order": 14, "sure": 14, "run": 14, "let": 15, "dummi": 15, "amax": 15, "ab": 15, "print": 15, "f": 15, "prefer": 15, "workflow": 15, "2d": 15, "dimens": 15, "just": 15, "want": 15, "500": 15, "900": 15, "3200": 15, "list_file_nam": 15, "filetyp": 15, "But": 15, "easili": 15}, "objects": {"": [[0, 0, 0, "-", "audiofile"]], "audiofile": [[1, 1, 1, "", "bit_depth"], [2, 1, 1, "", "channels"], [3, 1, 1, "", "convert_to_wav"], [4, 1, 1, "", "duration"], [5, 1, 1, "", "has_video"], [6, 1, 1, "", "read"], [7, 1, 1, "", "samples"], [8, 1, 1, "", "sampling_rate"], [9, 1, 1, "", "write"]]}, "objtypes": {"0": "py:module", "1": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "function", "Python function"]}, "titleterms": {"audiofil": [0, 13], "bit_depth": 1, "channel": 2, "convert_to_wav": 3, "durat": 4, "has_video": 5, "read": [6, 10, 15], "sampl": 7, "sampling_r": 8, "write": [9, 15], "benchmark": 10, "procedur": 10, "audio": 10, "file": [10, 15], "python": 10, "packag": 10, "access": 10, "metadata": 10, "run": [10, 12], "changelog": 11, "version": 11, "1": 11, "5": 11, "2025": 11, "01": 11, "03": 11, "0": 11, "2024": 11, "07": 11, "26": 11, "4": 11, "30": 11, "3": 11, "2": 11, "2023": 11, "12": 11, "05": 11, "11": 11, "29": 11, "02": 11, "13": 11, "2022": 11, "22": 11, "04": 11, "14": 11, "2021": 11, "06": 11, "10": 11, "28": 11, "08": 11, "2020": 11, "17": 11, "27": 11, "31": 11, "2019": 11, "25": 11, "contribut": 12, "develop": 12, "instal": [12, 14], "code": 12, "convent": 12, "build": 12, "document": 12, "test": 12, "creat": 12, "new": 12, "releas": 12, "usag": 15, "inform": 15, "convert": 15, "resampl": 15, "remix": 15}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx.ext.intersphinx": 1, "sphinx": 57}, "alltitles": {"audiofile": [[0, "module-audiofile"], [13, "audiofile"]], "bit_depth()": [[1, "bit-depth"]], "channels()": [[2, "channels"]], "convert_to_wav()": [[3, "convert-to-wav"]], "duration()": [[4, "duration"]], "has_video()": [[5, "has-video"]], "read()": [[6, "read"]], "samples()": [[7, "samples"]], "sampling_rate()": [[8, "sampling-rate"]], "write()": [[9, "write"]], "Benchmark": [[10, "benchmark"]], "Procedure": [[10, "procedure"]], "Audio files": [[10, "audio-files"]], "Python packages": [[10, "python-packages"]], "Reading files": [[10, "reading-files"], [10, "id1"]], "Accessing metadata": [[10, "accessing-metadata"], [10, "id2"]], "Running the benchmark": [[10, "running-the-benchmark"]], "Changelog": [[11, "changelog"]], "Version 1.5.1 (2025-01-03)": [[11, "version-1-5-1-2025-01-03"]], "Version 1.5.0 (2024-07-26)": [[11, "version-1-5-0-2024-07-26"]], "Version 1.4.0 (2024-01-30)": [[11, "version-1-4-0-2024-01-30"]], "Version 1.3.2 (2023-12-05)": [[11, "version-1-3-2-2023-12-05"]], "Version 1.3.1 (2023-11-29)": [[11, "version-1-3-1-2023-11-29"]], "Version 1.3.0 (2023-07-12)": [[11, "version-1-3-0-2023-07-12"]], "Version 1.2.1 (2023-02-13)": [[11, "version-1-2-1-2023-02-13"]], "Version 1.2.0 (2023-02-13)": [[11, "version-1-2-0-2023-02-13"]], "Version 1.1.1 (2022-12-22)": [[11, "version-1-1-1-2022-12-22"]], "Version 1.1.0 (2022-04-14)": [[11, "version-1-1-0-2022-04-14"]], "Version 1.0.3 (2022-01-03)": [[11, "version-1-0-3-2022-01-03"]], "Version 1.0.2 (2021-12-06)": [[11, "version-1-0-2-2021-12-06"]], "Version 1.0.1 (2021-10-28)": [[11, "version-1-0-1-2021-10-28"]], "Version 1.0.0 (2021-08-05)": [[11, "version-1-0-0-2021-08-05"]], "Version 0.4.3 (2021-07-30)": [[11, "version-0-4-3-2021-07-30"]], "Version 0.4.2 (2021-04-26)": [[11, "version-0-4-2-2021-04-26"]], "Version 0.4.1 (2020-12-17)": [[11, "version-0-4-1-2020-12-17"]], "Version 0.4.0 (2020-11-26)": [[11, "version-0-4-0-2020-11-26"]], "Version 0.3.4 (2020-10-29)": [[11, "version-0-3-4-2020-10-29"]], "Version 0.3.3 (2020-10-29)": [[11, "version-0-3-3-2020-10-29"]], "Version 0.3.2 (2020-10-29)": [[11, "version-0-3-2-2020-10-29"]], "Version 0.3.1 (2020-10-27)": [[11, "version-0-3-1-2020-10-27"]], "Version 0.3.0 (2020-10-27)": [[11, "version-0-3-0-2020-10-27"]], "Version 0.2.4 (2020-08-31)": [[11, "version-0-2-4-2020-08-31"]], "Version 0.2.3 (2020-08-31)": [[11, "version-0-2-3-2020-08-31"]], "Version 0.2.2 (2019-10-04)": [[11, "version-0-2-2-2019-10-04"]], "Version 0.2.1 (2019-05-02)": [[11, "version-0-2-1-2019-05-02"]], "Version 0.2.0 (2019-05-02)": [[11, "version-0-2-0-2019-05-02"]], "Version 0.1.3 (2019-03-27)": [[11, "version-0-1-3-2019-03-27"]], "Version 0.1.2 (2019-03-25)": [[11, "version-0-1-2-2019-03-25"]], "Version 0.1.1 (2019-03-25)": [[11, "version-0-1-1-2019-03-25"]], "Version 0.1.0 (2019-03-25)": [[11, "version-0-1-0-2019-03-25"]], "Contributing": [[12, "contributing"]], "Development Installation": [[12, "development-installation"]], "Coding Convention": [[12, "coding-convention"]], "Building the Documentation": [[12, "building-the-documentation"]], "Running the Tests": [[12, "running-the-tests"]], "Creating a New Release": [[12, "creating-a-new-release"]], "Installation": [[14, "installation"]], "Usage": [[15, "usage"]], "Write a file": [[15, "write-a-file"]], "File information": [[15, "file-information"]], "Read a file": [[15, "read-a-file"]], "Convert a file": [[15, "convert-a-file"]], "Resample/Remix a file": [[15, "resample-remix-a-file"]]}, "indexentries": {"audiofile": [[0, "module-audiofile"]], "module": [[0, "module-audiofile"]], "bit_depth() (in module audiofile)": [[1, "audiofile.bit_depth"]], "channels() (in module audiofile)": [[2, "audiofile.channels"]], "convert_to_wav() (in module audiofile)": [[3, "audiofile.convert_to_wav"]], "duration() (in module audiofile)": [[4, "audiofile.duration"]], "has_video() (in module audiofile)": [[5, "audiofile.has_video"]], "read() (in module audiofile)": [[6, "audiofile.read"]], "samples() (in module audiofile)": [[7, "audiofile.samples"]], "sampling_rate() (in module audiofile)": [[8, "audiofile.sampling_rate"]], "write() (in module audiofile)": [[9, "audiofile.write"]]}}) \ No newline at end of file diff --git a/usage.html b/usage.html index 99b456a..54e36b6 100644 --- a/usage.html +++ b/usage.html @@ -68,7 +68,7 @@
      - v1.5.0 + v1.5.1
      @@ -377,7 +377,7 @@

      Resample/Remix a fileSphinx on 2024/07/26 using the audEERING theme + Built with Sphinx on 2025/01/03 using the audEERING theme

      @@ -385,7 +385,7 @@

      Resample/Remix a file

      - © 2018-2024 audEERING GmbH + © 2018-2025 audEERING GmbH