# Run test-flow / FFT with locally stored audio-file?

**URL:** <https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88>\
**Category:** QA401\
**Created:** [May 13, 2020, 4:09pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88 "2020-05-13T16:09:09Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![audio-dav](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@audio-dav](https://forum.quantasylum.com/u/audio-dav)\
**Post date:** [May 13, 2020, 4:09pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/1 "2020-05-13T16:09:09Z")

</div>

Hi,

Planning to run the following setup:  
QA401 -\> transducer amp -\> ref speaker -\> “DUT” which is a microphone  
-\> XLR+phantom -\> mic-pre -\> QA401

The DUT also has USB-audio class output via an internal ADC that needs to be tested (not part of the XLR signal chain)

Question:

- Can we somehow pipe the captured chirp to the same analysis process?  
i.e. we will capture the usb-audio to a local .wav file then hopefully be able to pipe it to the QA software!

/d

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.quantasylum.com/u/matt)\
**Post date:** [May 13, 2020, 5:33pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/2 "2020-05-13T17:33:00Z")

</div>

Hi @audio-dav, Your first setup should work fine where you are using the QA401 DAC to drive a speaker and then capture that back into the QA401. The first link below is similar problem, but comparing a mic to a reference mic. But in your case, you can readily capture the chirp and compare to a mask.

For your question about loading a captured chirp into the QA401 software…that’s not currently possible but it’s a very reasonable feature request for the future (but not near term, unfortunately).

1. [Mic Comparisons under Tractor](https://forum.quantasylum.com/t/mic-comparisons-under-tractor/46)

---

<div class="post-metadata">

**Author:** ![audio-dav](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@audio-dav](https://forum.quantasylum.com/u/audio-dav)\
**Post date:** [May 16, 2020, 2:39pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/3 "2020-05-16T14:39:48Z")

</div>

Thanks for reply Matt,

Any alternatives to solve the USB-audio capture?  
I’d rather not do [mic -\> adc -\> usb audio device] -\> usb cable to computer -\> USB-soundcard/DAC -\> output it back to the QA401.

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.quantasylum.com/u/matt)\
**Post date:** [May 18, 2020, 4:03pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/4 "2020-05-18T16:03:54Z")

</div>

Not at this point. Just to make sure I understand: Is what you are looking for the ability to load a WAV file and then have analysis performed on that WAV file both in the app and also via Tractor?

---

<div class="post-metadata">

**Author:** ![audio-dav](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@audio-dav](https://forum.quantasylum.com/u/audio-dav)\
**Post date:** [May 19, 2020, 9:01am UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/5 "2020-05-19T09:01:40Z")

</div>

in our case, we’ll run dotnet core on linux, so primarily needed here.  
but of course it’s nice being able to test it on windows in the QAxx app.

I can see two solutions

1. load raw wav

- where the file is something we capture via a raw usb-cdc/libusb ourselves
- or via standard usb-audio to disk, or even better, pipe the audio directly to the QAxx app via “stdin”

1. offer class-compliant usb-audio input as an option.

- in this case it’s important we can use both QA401 + the additional USB-audio in or out at the same time.

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.quantasylum.com/u/matt)\
**Post date:** [May 20, 2020, 5:04pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/6 "2020-05-20T17:04:22Z")

</div>

Hi @audio-dav, currently there’s the ability to File-\>Import a time series. This will let you pull in a time-series you’ve previously exported. If you had an external program that was writing the WAV, you could also have it write out a time series and then File-\>Import that.

But I think what we need to do here is:

1. Add the ability to import a WAV from the file menu
2. Add the ability to import a WAV or time series programmatically
3. Add a test in Tractor that will force a WAV file to be loaded in QAAnalyzer.exe

I don’t have an idea when the above will be done, but they are on the list.

```auto
# TIME SERIES
# 5/20/2020 9:57 AM
# Units: Volts
# Sample Rate: 48000
# Pre Buffer Size: 2048
# Data Points: 16384
# Atten Enabled: False
# Time, Output Left Data, output Right Data, Input Left Data, Input Right Data
0.042666667, -0.113730041, -0.113730041,-0.102785794, 0.000000925
0.042687500, -0.127531189, -0.127531189,-0.117832134, 0.000018351
0.042708333, -0.139162639, -0.139162639,-0.130867125, 0.000026370
0.042729167, -0.148425763, -0.148425763,-0.141663462, -0.000019739
```

---

<div class="post-metadata">

**Author:** ![audio-dav](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@audio-dav](https://forum.quantasylum.com/u/audio-dav)\
**Post date:** [May 21, 2020, 12:18pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/7 "2020-05-21T12:18:44Z")

</div>

good to know it’s planned! thx!

how about allowing an additional usb-audio input?  
(you could still require the QA40x to be connected)

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.quantasylum.com/u/matt)\
**Post date:** [June 2, 2020, 10:55pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/8 "2020-06-02T22:55:25Z")

</div>

Hi @audio-dav, there’s now the ability to import a wav file. See the 1.909 release notes.

---

<div class="post-metadata">

**Author:** ![audio-dav](https://avatars.discourse-cdn.com/v4/letter/a/8491ac/32.png) [@audio-dav](https://forum.quantasylum.com/u/audio-dav)\
**Post date:** [June 3, 2020, 8:56am UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/9 "2020-06-03T08:56:24Z")

</div>

fantastic! thanks matt!  
any chance to see streaming input (pipe or socket) or usb-audio-class as a next step? 🙂

---

<div class="post-metadata">

**Author:** ![matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@matt](https://forum.quantasylum.com/u/matt)\
**Post date:** [June 3, 2020, 2:49pm UTC](https://forum.quantasylum.com/t/run-test-flow-fft-with-locally-stored-audio-file/88/10 "2020-06-03T14:49:44Z")

</div>

No, that’s not in the plans currently and probably won’t be added unless a really good use-case presents. The WAV import makes sense so that you can pull a wav from a remote server (an http address should work for the file name). This should permit testing mic sensitivity/frequency response on a internet connected device.
