Acerca de
🎵 Playing Sounds in Python
Diseño y multimediaCrecimiento de estrellas medido
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- 0
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
OriginalOverview
Nava is a Python library that allows users to play sound in Python without any dependencies or platform restrictions. It is a cross-platform solution that runs on any operating system, including Windows, macOS, and Linux. Its lightweight and easy-to-use design makes Nava an ideal choice for developers looking to add sound functionality to their Python programs.
| PyPI Counter |
|
| Github Stars |
|
| Branch | main | dev |
| Linux CI | ||
| Windows CI | ||
| macOS CI |
| Code Quality |
Installation
PyPI
- Check Python Packaging User Guide
- Run
pip install nava==1.0
Source code
- Download Version 1.0 or Latest Source
- Run
pip install .
Conda
- Check Conda Managing Package
- Update Conda using
conda update conda - Run
conda install -c openscilab -c sepandhaghighi nava
Usage
Basic
from nava import play
play("alarm.wav")
Async mode
[!NOTE] The
async_modeparameter has a default value ofFalse
import time
from nava import play, stop
sound_id = play("alarm.wav", async_mode=True)
time.sleep(4)
stop(sound_id)
Loop mode
[!NOTE] The
loopparameter has a default value ofFalse
[!WARNING] You should always set
async_modeflag when you are usingloop
from nava import play, stop
sound_id = play("alarm.wav", async_mode=True, loop=True)
time.sleep(100)
stop(sound_id)
Error
from nava import play, NavaBaseError
try:
play("alarm.wav")
except NavaBaseError as e:
print(str(e))
Engine
[!NOTE] The
engineparameter has a default value ofAUTO
from nava import play, Engine
sound_id = play("alarm.wav", engine=Engine.AFPLAY)
CLI
$ nava [--file FILE_PATH] [--loop] [--engine ENGINE] FILE_PATH
Engines list
List of different platforms and the corresponding engines that are used for sound playing.
| Engine | Platform | References | Supported Formats |
|---|---|---|---|
ALSA |
Linux | Advanced Linux Sound Architecture | .wav |
WINSOUND |
Windows | Winsound | .wav |
WINMM |
Windows | Windows MCI (Media Control Interface) | .wav, .mp3, .avi |
AFPLAY |
macOS | Audio File Play | .wav, .mp3 |
Issues & bug reports
Just fill an issue and describe it. We'll check it ASAP! or send an email to [email protected].
- Please complete the issue template
You can also join our discord server
Acknowledgments
Python Software Foundation (PSF) grants Nava library from version 0.8 to 0.9. PSF is the organization behind Python. Their mission is to promote, protect, and advance the Python programming language and to support and facilitate the growth of a diverse and international community of Python programmers.
Show your support
Star this repo
Give a ⭐️ if this project helped you!
Donate to our project
If you do like our project and we hope that you do, can you please support us? Our project is not and is never going to be working for profit. We need the money just so we can continue doing what we do ;-) .
Explorar proyectos relacionados
Cargando…

