Python library for asynchronously writing audio files in chunks?

This page summarizes the projects mentioned and recommended in the original post on /r/learnprogramming

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • aiofiles

    File support for asyncio

  • I'm unaware of a library that facilitates any of this, so unless I find one or more suitable libraries with this matter, then I'm looking at using Numba and either aiofiles or aiofile—I'm not yet sure what the difference between the two is—and writing my own encoder(s).

  • aiofile

    Real asynchronous file operations with asyncio support.

  • I'm unaware of a library that facilitates any of this, so unless I find one or more suitable libraries with this matter, then I'm looking at using Numba and either aiofiles or aiofile—I'm not yet sure what the difference between the two is—and writing my own encoder(s).

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • NumPy

    The fundamental package for scientific computing with Python.

  • Now, I'd like to discuss the stack. I'm currently using PyPy 3.8 for its speed of execution. To do the calculations, I'm using NumPy and SymPy. To further speed up and parallelize the calculations, I'm looking at incorporating Numba, but I'm open to alternative suggestions. As for writing and encoding the data, I understand that SciPy has a module that simplifies the encoding and writing of a NumPy array to an uncompressed WAV file (but no other audio formats). However, it's synchronous and can't write data non-sequentially.

  • Numba

    NumPy aware dynamic Python compiler using LLVM

  • Now, I'd like to discuss the stack. I'm currently using PyPy 3.8 for its speed of execution. To do the calculations, I'm using NumPy and SymPy. To further speed up and parallelize the calculations, I'm looking at incorporating Numba, but I'm open to alternative suggestions. As for writing and encoding the data, I understand that SciPy has a module that simplifies the encoding and writing of a NumPy array to an uncompressed WAV file (but no other audio formats). However, it's synchronous and can't write data non-sequentially.

  • kivy

    Open source UI framework written in Python, running on Windows, Linux, macOS, Android and iOS

  • I had an existing (albeit very elementary) implementation, but let's just say that I didn't have backups. Anyway, I know with certainty that rendering will be the most difficult task to overcome. Some of the sounds that I plan on generating are incredibly complex—like ray-tracing-sound-waves-from-an-acoustic-guitar-made-of-a-particular-type-of-wood complex. And I want it to be as fast as possible so that it can (hopefully) be rendered in real-time. So I don't feel that my attention to that aspect is premature optimization. Plus, this application will have a GUI (probably via Kivy) and I don't want to lock up the UI while rendering, encoding, writing, etc.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts