kandi background
Explore Kits

python-soundfile | SoundFile is an audio library based on libsndfile | Data Manipulation library

 by   bastibe Python Version: 0.11.0b1 License: BSD-3-Clause

 by   bastibe Python Version: 0.11.0b1 License: BSD-3-Clause

Download this library from

kandi X-RAY | python-soundfile Summary

python-soundfile is a Python library typically used in Utilities, Data Manipulation, Numpy applications. python-soundfile has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub.
SoundFile is an audio library based on libsndfile, CFFI, and NumPy
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • python-soundfile has a low active ecosystem.
  • It has 437 star(s) with 65 fork(s). There are 17 watchers for this library.
  • There were 1 major release(s) in the last 12 months.
  • There are 63 open issues and 99 have been closed. On average issues are closed in 13 days. There are 8 open pull requests and 0 closed requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of python-soundfile is 0.11.0b1
python-soundfile Support
Best in #Data Manipulation
Average in #Data Manipulation
python-soundfile Support
Best in #Data Manipulation
Average in #Data Manipulation

quality kandi Quality

  • python-soundfile has 0 bugs and 0 code smells.
python-soundfile Quality
Best in #Data Manipulation
Average in #Data Manipulation
python-soundfile Quality
Best in #Data Manipulation
Average in #Data Manipulation

securitySecurity

  • python-soundfile has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • python-soundfile code analysis shows 0 unresolved vulnerabilities.
  • There are 0 security hotspots that need review.
python-soundfile Security
Best in #Data Manipulation
Average in #Data Manipulation
python-soundfile Security
Best in #Data Manipulation
Average in #Data Manipulation

license License

  • python-soundfile is licensed under the BSD-3-Clause License. This license is Permissive.
  • Permissive licenses have the least restrictions, and you can use them in most projects.
python-soundfile License
Best in #Data Manipulation
Average in #Data Manipulation
python-soundfile License
Best in #Data Manipulation
Average in #Data Manipulation

buildReuse

  • python-soundfile releases are available to install and integrate.
  • Build file is available. You can build the component from source.
  • python-soundfile saves you 796 person hours of effort in developing the same functionality from scratch.
  • It has 1908 lines of code, 200 functions and 10 files.
  • It has high code complexity. Code complexity directly impacts maintainability of the code.
python-soundfile Reuse
Best in #Data Manipulation
Average in #Data Manipulation
python-soundfile Reuse
Best in #Data Manipulation
Average in #Data Manipulation
Top functions reviewed by kandi - BETA

kandi has reviewed python-soundfile and discovered the below as its top functions. This is intended to give you an instant insight into python-soundfile implemented functionality, and help decide if they suit your requirements.

  • Create a SF_INFO struct
    • Format an unsigned integer
    • Get the format from the file extension
    • Returns the default subtype for the given format
    • Check format_str
  • Open file
    • Return True if the file has the virtual io attributes
  • Clean up build files
    • Sf version string

      Get all kandi verified functions for this library.

      Get all kandi verified functions for this library.

      python-soundfile Key Features

      SoundFile is an audio library based on libsndfile, CFFI, and NumPy

      Convert from opus to ogg file using ffmpeg [python soundfile]

      copy iconCopydownload iconDownload
      # converting opus to ogg files for reading audio files with python soundfile
      from glob import glob
      from tqdm import tqdm
      import soundfile as sf 
      import librosa
      import os
      
      for f in tqdm(glob("/Data/AUDIO_DATA/mls_dutch_opus/*/audio/*/*/*.opus") + glob("/Data/AUDIO_DATA/mls_german_opus/*/audio/*/*/*.opus")):
          audio, sr = librosa.load(f, res_type='kaiser_fast', sr = 16000)
          sf.write(f.replace(".opus", ".ogg"), audio, sr, format='ogg', subtype='vorbis')
          os.remove(f)
      
      ffmpeg -i input.opus -c:a vorbis -strict experimental output.ogg
      
      ffmpeg -i input.opus -f wav - | oggenc -o output.ogg -
      
      ffmpeg -i input.opus -c:a vorbis -strict experimental output.ogg
      
      ffmpeg -i input.opus -f wav - | oggenc -o output.ogg -
      

      Community Discussions

      Trending Discussions on python-soundfile
      • Convert from opus to ogg file using ffmpeg [python soundfile]
      Trending Discussions on python-soundfile

      QUESTION

      Convert from opus to ogg file using ffmpeg [python soundfile]

      Asked 2021-Sep-27 at 16:16

      I'm using python soundfile to audio files in one of my projects. I have a dataset that contains opus files.

      python soundfile can not read opus files directly but can read ogg files. (https://github.com/bastibe/python-soundfile/issues/252)

      How can I convert all the opus files to ogg files with ffmpeg?

      I have tried the following command,

       ffmpeg -i test_file_2.opus -c:a libvorbis -b:a 16k test_file_2.ogg
      
      

      But I get an error,

      ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
        built with gcc 7.3.0 (crosstool-NG 1.23.0.449-a04d0)
        configuration: --prefix=/opt/conda --cc=/opt/conda/conda-bld/ffmpeg_1597178665428/_build_env/bin/x86_64-conda_cos6-linux-gnu-cc --disable-doc --disable-openssl --enable-avresample --enable-gnutls --enable-hardcoded-tables --enable-libfreetype --enable-libopenh264 --enable-pic --enable-pthreads --enable-shared --disable-static --enable-version3 --enable-zlib --enable-libmp3lame
        libavutil      56. 51.100 / 56. 51.100
        libavcodec     58. 91.100 / 58. 91.100
        libavformat    58. 45.100 / 58. 45.100
        libavdevice    58. 10.100 / 58. 10.100
        libavfilter     7. 85.100 /  7. 85.100
        libavresample   4.  0.  0 /  4.  0.  0
        libswscale      5.  7.100 /  5.  7.100
        libswresample   3.  7.100 /  3.  7.100
      [ogg @ 0x55bad6b9cbc0] 543 bytes of comment header remain
      Input #0, ogg, from 'test_file_2.opus':
        Duration: 00:00:14.10, start: 0.000000, bitrate: 34 kb/s
          Stream #0:0: Audio: opus, 48000 Hz, mono, fltp
          Metadata:
            album           : Onder Moeders Vleugels
            ENCODER_OPTIONS : --quiet
            artist          : Louisa May Alcott
            title           : 02 - Een vroolijk kerstfeest
            encoder         : opusenc from opus-tools 0.1.10;Lavf57.83.100
      Unknown encoder 'libvorbis'
      
      

      ANSWER

      Answered 2021-Sep-27 at 11:13

      I'm using librosa right now for conversion, but this is extremely slow:

      # converting opus to ogg files for reading audio files with python soundfile
      from glob import glob
      from tqdm import tqdm
      import soundfile as sf 
      import librosa
      import os
      
      for f in tqdm(glob("/Data/AUDIO_DATA/mls_dutch_opus/*/audio/*/*/*.opus") + glob("/Data/AUDIO_DATA/mls_german_opus/*/audio/*/*/*.opus")):
          audio, sr = librosa.load(f, res_type='kaiser_fast', sr = 16000)
          sf.write(f.replace(".opus", ".ogg"), audio, sr, format='ogg', subtype='vorbis')
          os.remove(f)
      

      Source https://stackoverflow.com/questions/69342452

      Community Discussions, Code Snippets contain sources that include Stack Exchange Network

      Vulnerabilities

      No vulnerabilities reported

      Install python-soundfile

      You can download it from GitHub.
      You can use python-soundfile like any standard Python library. You will need to make sure that you have a development environment consisting of a Python distribution including header files, a compiler, pip, and git installed. Make sure that your pip, setuptools, and wheel are up to date. When using pip it is generally recommended to install packages in a virtual environment to avoid changes to the system.

      Support

      For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

      DOWNLOAD this Library from

      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
      over 430 million Knowledge Items
      Find more libraries
      Reuse Solution Kits and Libraries Curated by Popular Use Cases
      Explore Kits

      Save this library and start creating your kit

      Explore Related Topics

      Share this Page

      share link
      Consider Popular Data Manipulation Libraries
      Try Top Libraries by bastibe
      Compare Data Manipulation Libraries with Highest Support
      Compare Data Manipulation Libraries with Highest Quality
      Compare Data Manipulation Libraries with Highest Security
      Compare Data Manipulation Libraries with Permissive License
      Compare Data Manipulation Libraries with Highest Reuse
      Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
      over 430 million Knowledge Items
      Find more libraries
      Reuse Solution Kits and Libraries Curated by Popular Use Cases
      Explore Kits

      Save this library and start creating your kit

      • © 2022 Open Weaver Inc.