🎵 Audio Module

The Audio module provides tools to process, edit, transform, and analyze audio files easily using AllkitPy.


🚀 Quick Example

💻 Code

import allkitpy

allkitpy.audio.convert("song.mp3", "song.wav")

📤 Output

Converted successfully

🔄 convert()

Convert audio files between formats (mp3, wav, ogg, etc).

💻 Code

allkitpy.audio.convert(
    "song.mp3",
    "song.wav"
)

📤 Output

Converted successfully

🔗 merge()

Merge multiple audio files into one.

💻 Code

allkitpy.audio.merge(
    ["a.mp3", "b.mp3"],
    "out.mp3"
)

📤 Output

Merged successfully

✂ split()

Extract a portion of an audio file.

💻 Code

allkitpy.audio.split(
    "song.mp3",
    10000,
    30000,
    "clip.mp3"
)

📤 Output

Split saved

✂ trim()

Trim audio between start and end time.

💻 Code

allkitpy.audio.trim(
    "song.mp3",
    5000,
    20000,
    "trim.mp3"
)

📤 Output

Trimmed successfully

🔊 Volume Control

increase() / decrease()

Increase or decrease audio volume.

💻 Code

allkitpy.audio.increase("song.mp3", 5, "loud.mp3")

allkitpy.audio.decrease("song.mp3", 5, "quiet.mp3")

📤 Output

Volume adjusted

🎧 Effects

fade_in() / fade_out()

Add fade-in and fade-out effects.

💻 Code

allkitpy.audio.fade_in("song.mp3", 3000, "in.mp3")

allkitpy.audio.fade_out("song.mp3", 3000, "out.mp3")

📤 Output

Effect applied

normalize()

Normalize audio volume level.

💻 Code

allkitpy.audio.normalize("song.mp3", "norm.mp3")

📤 Output

Normalized

⚡ Edit

reverse()

Reverse audio playback.

💻 Code

allkitpy.audio.reverse("song.mp3", "rev.mp3")

📤 Output

Reversed

speed()

Change playback speed (0.5x, 2x, etc).

💻 Code

allkitpy.audio.speed("song.mp3", 2.0, "fast.mp3")

📤 Output

Speed changed

📊 Info

metadata()

Get audio file information.

💻 Code

allkitpy.audio.metadata("song.mp3")

📤 Output

{
  duration: 120.5,
  channels: 2,
  sample_rate: 44100
}

duration() / channels() / sample_rate()

Get basic audio properties.

💻 Code

allkitpy.audio.duration("song.mp3")
allkitpy.audio.channels("song.mp3")
allkitpy.audio.sample_rate("song.mp3")

📤 Output

120.5
2
44100

📋 Summary

Function Description
convert() Convert audio between formats
merge() Merge multiple audio files
split() Extract a portion of audio
trim() Trim audio between times
increase()/decrease() Adjust volume level
fade_in()/fade_out() Apply fade effects
normalize() Normalize volume level
reverse() Reverse audio playback
speed() Change playback speed
metadata() Get audio metadata

🔗 Related Modules

🎬 Video Module

Video processing and editing tools.

📊 Data Module

Data processing and analysis utilities.

📁 File Module

File operations and management tools.