Skip to main content

yata[WIP]

Yet Another Tools for Audio deep learning(for myself).

pip install libyata

Usage

(NEW!)As command line batch running tools

  • usage
    yata glob_pattern --command command_pattern --replace_from foo --replace_to bar --j NUM_PROCESSES --dry_run True/False
    
    args:
    • --command: set command pattern.
      with placeholder of {i} as input file and {o} as output file
    • --j number of process to run
    • --dry_run: only show command to be run but not actual running it.
      for example: "mv 1.wav 1_backup.wav"
  • examples
    • batch rename example:
      On terminal, just type this to see guide:

      yata_guide rename
      

      you will get a guide:

      yata './**/*' --command 'mv {i} {o}' --replace_from .aac --replace_to .wav --j 4 --dry_run True
      

      You can run it directly and will show you the dry running command to be run:

      yata date:20210418_161624, total_files:56, dry_run=True
      mv ./testdir/1.wav ./testdir/1.aac
      mv ./testdir/2i/2.wav ./testdir/2i/2.aac
      mv ./testdir_16k/1.wav ./testdir_16k/1.aac
      mv ./testdir_16k/2i/2.wav ./testdir_16k/2i/2.aac
      mv ./yata/61-70968-0002.wav ./yata/61-70968-0002.aac
      100%|██████████████████████████████████| 55/55 [00:00<00:00, 37724.73it/s]
      yata done:20210418_161705, total_files:56, dry_run=True
      

      You can modify it as your will and run it, remember to remove "--dry_run True":

      yata './**/*' --command   'mv {i} {o}' --replace_from .wav --replace_to _backup.wav --j 4
      
    • batch resample example:
      Type

      yata_guide resample
      

      to get this guide:

      yata './**/*' --command 'ffmpeg -hide_banner -loglevel quiet  -i {i} -f wav -ar 16000 -acodec pcm_s16le -ac 1 {o}  -y' --replace_from .aac --replace_to .wav --j 10 --dry_run True
      
  • with pythonic support
    • tqdm
    • multiprocessing
    • auto new_dir

As python package

import yata
  • handy tools

    • yata.utils.run():
      No more ArgumentParser!!
      you can pass and update any parameter with:
      python test.py --a 2 --lr 0.01
      
      with code like:
      import yata
      
      default_hp = {"a":1,"b":2}
      args = yata.util.run(default_hp)
      
      you can acess params like HParams:
      print(args.a, args.b) # acess default params
      print(args.lr) # acess newly add params from CLI
      
    • yata.utils.new_dir:
      Make directory like this ./file_a/tag/1/ with:
      new_dir("file_a", "tag", 1)
      
    • yata.utils.backup_code:
      Backup all your *.py(optional) to a zip file, eg. backup code for every experiments before running.
    • yata.utils.get_current_date: Get date as string
    • yata.utils.merge_parts: merge csv files
      • merge_parts(pattern, output_name="", sep=",")
  • Tensorflow alternatives

    • yata.utils.HParams:
      An alternative to tf.contrib.training.HParams without Tensorflow dependency
    • yata.utils.to_categorical:
      An alternative to tf.keras.utils.to_categorical without Tensorflow & keras dependency
  • data augmentation

    • mixup: paper code
    • SpecAugment: paper code
    • mp3 as augumentation,用MP3编码后去掉的不可听噪声,把这种生成不可听噪声作为数据增强的手段(做法:加高斯,把MP3当成一个mask去编码,把MP3mask挖掉的区域的高斯留下来加到频谱上面,形成不可听噪声)
    • phase putertubation
  • feature extraction

    • PASE: paper code
    • Multi scale MelSpectrogram

Metadata

Release files for libyata 0.7.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for libyata 0.7.8
File Size Uploaded Provenance Actions
libyata-0.7.8.tar.gz 28.0 kB Without provenance Details for libyata-0.7.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for libyata 0.7.8
File Interpreter ABI Platform Actions
libyata-0.7.8-py3-none-any.whl Python 3 none any Details for libyata-0.7.8-py3-none-any.whl

Total release size: 58.7 kB

Release files / libyata-0.7.8.tar.gz

Download URL libyata-0.7.8.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
c4bcf77ed6ae0ac39215953c0563db5507f241c6b3d4e82fe9d43c2cb28b81e6
BLAKE2b-256 checksum
How to use checksums
1df36c9156336575552333c1dc336a0e1fdb93fbcff0b49e1b200f48bb5c510b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Release files / libyata-0.7.8-py3-none-any.whl

Download URL libyata-0.7.8-py3-none-any.whl
Size 30.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88cc56b4ad7d3faa8924d31e66c6ae3eb8c354f54d3ba772a0e8f46bbb6f59de
BLAKE2b-256 checksum
How to use checksums
886ba14d088ec333f4d638a9d276d69e2f84bdf451d3a109cb70b654ef2869cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.7

Security for libyata 0.7.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page