Exemplo n.º 1
0
def run(audio):
    f, psd = aa.spectrum(audio)
    peaklist = aa.peak_map(psd)
    peaksdex = aa.peak_assign(peaklist)
    output = guesswork(f, psd, peaklist, peaksdex)
    # print(aa.print_identify(aa.identify(output)))
    return output
Exemplo n.º 2
0
def runfromfft(f, psd):
    ax = gf.init_image()
    gf.semi_graph(ax, f, psd)
    maxdex = aa.max_range(psd, 20)
    # gf.button_grapher(ax, f, maxdex, psd)
    peaklist = aa.peak_map(psd)
    aa.peak_impose(ax, f, peaklist)
    plt.show()
Exemplo n.º 3
0
def runfromfft_graph(f, psd):
    peaklist = aa.peak_map(psd)
    peaksdex = aa.peak_assign(peaklist)
    output = guesswork(f, psd, peaklist, peaksdex)
    ax = gf.init_image(ylabel='POWER')
    gf.std_graph(ax, output[:, 0], output[:, 1])
    ax2 = gf.get_twinx(ax)
    gf.std_graph(ax2, output[:, 0], output[:, 2], c='r')
    plt.show()
    print(aa.print_identify(aa.identify(output)))
Exemplo n.º 4
0
def runfromfft(f, psd):
    peaklist = aa.peak_map(psd)
    peaksdex = aa.peak_assign(peaklist)
    output = guesswork(f, psd, peaklist, peaksdex)
    print(aa.print_identify(aa.identify(output)))
    return aa.identify(output)