{"id":26745,"library":"audiolab","title":"AudioLab","description":"A Python library for audio processing and analysis. Version 0.5.1, updated periodically. Supports audio formats like WAV, MP3, FLAC; provides utilities for reading, writing, converting, and manipulating audio data.","status":"active","version":"0.5.1","language":"python","source_language":"en","source_url":"https://github.com/pengzhendong/audiolab","tags":["audio","signal processing","wav","mp3","flac"],"install":[{"cmd":"pip install audiolab","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Required for array operations","package":"numpy","optional":false},{"reason":"Used for signal processing","package":"scipy","optional":false}],"imports":[{"note":"audio_open is a function, not a module. Use direct import.","wrong":"import audiolab.audio_open","symbol":"audio_open","correct":"from audiolab import audio_open"},{"note":"AudioFile is exposed at package level.","wrong":"from audiolab.core import AudioFile","symbol":"AudioFile","correct":"from audiolab import AudioFile"}],"quickstart":{"code":"from audiolab import audio_open\n\n# Open an audio file\nwith audio_open('example.wav') as f:\n    # Read all frames as numpy array\n    data = f.read_all()\n    print('Audio data shape:', data.shape)\n    print('Sample rate:', f.sampling_rate)\n    print('Channels:', f.channels)","lang":"python","description":"Basic example of opening an audio file and reading its data."},"warnings":[{"fix":"Always use 'with' statement as shown in quickstart.","message":"audio_open returns a context manager that may not be re-entrant. Do not reuse the same file handle after closing.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert problematic files to WAV or FLAC before processing.","message":"The library may not fully support all MP3 variants or high sample rates. Test with your specific files.","severity":"gotcha","affected_versions":"all"},{"fix":"Update code to handle numpy arrays. Use .tolist() if list needed.","message":"In version 0.5.0, the API changed: 'read' method now returns numpy array instead of list. Older code expecting list may break.","severity":"breaking","affected_versions":">=0.5.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run: pip install audiolab","cause":"Library not installed or installed in a different environment.","error":"ModuleNotFoundError: No module named 'audiolab'"},{"fix":"Upgrade: pip install --upgrade audiolab. Use: from audiolab import audio_open","cause":"Outdated version of audiolab (pre-0.5.0) or incorrect import path.","error":"AttributeError: module 'audiolab' has no attribute 'audio_open'"},{"fix":"Convert to WAV or FLAC using ffmpeg or another tool.","cause":"File format not supported (e.g., .ogg, .aac) or file is corrupted.","error":"ValueError: Unsupported audio format"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}