https://www.audio-perfection.com/spice-ltspice/distortion-measurements-with-ltspice.html
----------------------------------------------from Ron H.-----------------------------------------------------
If you use LTspice, you can use a .WAV file as in input, and then listen to the output of your simulation.
--------------------------------------------Below is from the LTspice help file:------------------------------------------------
.WAVE -- Write Selected Nodes to a .Wav File.
LTspice can write .wav audio files. These files can then be listened to or be used as the input of another simulation.
Syntax: .wave <filename.wav> <Nbits> <SampleRate> V(out) [V(out2) ...]
example: .wave C:\output.wav 16 44.1K V(left) V(right)
<filename.wav> is either a complete absolute path for the .wav file you wish to create or a relative path computed from the directory containing the simulation schematic or netlist. Double quotes may be used to specify a path containing spaces. <Nbits> is the number of sampling bits. The valid range is from 1 to 32 bits.
<SampleRate> is the number of samples to write per simulated second. The valid range is 1 to 4294967295 samples be second. The remainder of the syntax lists the nodes that you wish to save. Each node will be an independent channel in the .wav file. The number of channels may be as few as one or as many as 65535. It is possible to write a device current, e.g., Ib(Q1) as well as node voltage. The .wav analog to digital converter has a full scale range of -1 to +1 Volt or Amp.
Note that it is possible to write .wav files that cannot be played on your PC sound system because of the number of channels, sample rate or number of bits due to limitations of your PC's codec. But these .wav files may still be used in LTspice as input for another simulation. See the sections LTspice=>Circuit Elements=>V. Voltage Source and I. Current source for information on playing a .wav file into an LTspice simulation. If you want to play the .wav file on your PC sound card, keep in mind that the more popularly supported .wav file formats have 1 or 2 channels; 8 or 16 bits/channel; and a sample rate of 11025, 22050, or 44100 Hz.
***********************************************************
Syntax: Vxxx n+ n- wavefile=<filename> [chan=<nnn>]
This allows a .wav file to be used as an input to LTspice. <filename> is either a full, absolute path for the .wav file or a relative path computed from the directory containing the simulation schematic or netlist. Double quotes may be used to specify a path containing spaces. The .wav file may contain up to 65536 channels, numbered 0 to 65535. Chan may be set to specify which channel is used. By default, the first channel, number 0, is used. The .wav file is interpreted as having a full scale range from -1V to 1V.
This source only has meaning in a .tran analysis.