Skip to main content

Audio wav file test module

Project description

Copyright (c) 2021 lorry_rui

//////////usage://///////////////

for test sweep tone WAV file only

VC_tde USE only @ logitech , Lorry RUi

https://pypi.org/project/LvAut

https://github.com/Lorrytoolcenter/LvAut
|tests| |coverage| |docs| |python-versions| |license|

The Python package audio_wav handles all kind of audio files sample code:

.. code:: python

import LvAut.lvaut_THD as AUT filename='yourfile.wav' signal, sample_rate, channels=AUT.load(filename)

analyze_channels

.. code-block:: python import LvAut.lvaut_THD as AUT
filename='Device_Mic_THD_R_3.wav'
trigeFrequncy=400 ## this need sweep from high(above 400) to low sweep tone
stopananlysis=100 ## stop analyze_channels
channaelselect=1 ### if recording is dual channel ,leftchannel=1, rightchannel=2, otherwise no need to define
freq,thdh,thd_N,power,Freq_THD,thd_data,Freq_Power,PowerS,RubBuzz_data=AUT.analyze_channels(filename, trigeFrequncy,stopananlysis,channaelselect) print('FFT Frequency: %.1f Hz' % freq)
print("Sweep Max THD: %.4f%% " %thdh)
print("Sweep Max THD+N: %.4f%% Note, this is single tone use only " %thd_N)
print("Max Power: %.2fdB " %power)

============== -freq means: single tone , measured frequncy
-thdh means: Sweep Max THD -Freq_THD, measure THD's frequency -thd_data, measure THD's data -Freq_Power,measure Power's frequency -PowerS, measure Power's data -RubBuzz_data measure RB's data

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

LvAut-2021.0.7.tar.gz (920.2 kB view hashes)

Uploaded Source

Built Distribution

LvAut-2021.0.7-py3-none-any.whl (925.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page