Two rates, one ratio
A music CD stores 44,100 samples per second. Professional video uses 48,000. To play a CD track in a video we need samples at new instants, and 48,000 / 44,100 = 1.0884 is not a whole number.
Divide both rates by their greatest common divisor, 300: the ratio is 160/147. Every 147 input samples become exactly 160 output samples, and every 1/300 s = 3.33 ms the two grids of instants line up again.
Up, filter, down
Put 159 zeros after every input sample. The rate becomes 44,100 × 160 = 7,056,000 samples per second: a fine grid that holds both the old and the new instants. The real samples are untouched.
Stuffing zeros keeps the spectrum's shape but reveals copies of it. Our 1 kHz tone now also appears at 44.1 ± 1 kHz, 88.2 ± 1 kHz and higher. These copies, called images, are not in the music and must go.
A low-pass filter with cutoff 22.05 kHz removes every image: the one at 43.1 kHz drops by 78.6 dB. Its gain of 160 restores the level. In time, it fills the zeros with smooth values: interpolation.
The filter has two jobs. It removes images above the input's Nyquist frequency, 22.05 kHz, and it stops anything above the output's Nyquist, 24 kHz, folding back (aliasing) at step 3. So its cutoff is the smaller: 22.05 kHz.
Keep one fine sample in every 147 and drop the rest: 7,056,000 / 147 = 48,000 samples per second. Output y[m] is fine sample number 147·m, which sits at time m / 48,000 s.
The result and the shortcut
The new samples sit on the same 1 kHz sine. y[1] = 0.1281; the true tone at 20.83 µs is 0.1305. The first 8 outputs are up to 0.0025 off, because the filter sees silence before x[0]. After that the error stays below 0.0007.
Done literally, the filter runs at 7.056 MHz over mostly zeros, then 146 of every 147 results are thrown away. A polyphase filter computes only the kept outputs, with only the 20 or 21 taps that land on real samples.
scipy.signal.resample_poly(x, 160, 147) does all three steps with a polyphase filter. By default it designs the low-pass itself: 3,201 taps, a Kaiser window with β = 5, cutoff 1/160 of the fine Nyquist frequency.
The working
# step 1/10 · rates
input fs = 44,100 Hz (audio CD)
one sample every 22.68 µs
output fs = 48,000 Hz (professional video)
one sample every 20.83 µs
48000 / 44100 = 1.0884
not a whole number: we cannot just
repeat or drop samples
test signal: a 1 kHz tone, x[n] = sin(2π·1000·n / 44100)
The tone is a chosen test signal at full scale 1. The filter is the one scipy.signal.resample_poly designs by default; every value in the figure is computed from it and matches scipy 1.18.1. The token streams are not to scale: after the upsampler only a few of the 159 zeros per sample are drawn, and the spectrum shows 0 to 100 kHz of a fine grid that reaches 3.528 MHz.