Skip to content

Commit c2eddfa

Browse files
committed
Add commands
1 parent 0a3ddb1 commit c2eddfa

2 files changed

Lines changed: 64 additions & 0 deletions

File tree

assets/commands/index.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6824,6 +6824,7 @@ sox.md
68246824
soxi.md
68256825
spa-acp-tool.md
68266826
spa-inspect.md
6827+
spa-resample.md
68276828
spark.md
68286829
spctoppm.md
68296830
spd-say.md

assets/commands/spa-resample.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
# TAGLINE
2+
3+
PipeWire resampler debugging utility
4+
5+
# TLDR
6+
7+
**Resample** a WAV file to a different sample rate
8+
9+
```spa-resample -r [48000] [input.wav] [output.wav]```
10+
11+
**Resample** with a specific output **format**
12+
13+
```spa-resample -r [48000] -f [s32] [input.wav] [output.wav]```
14+
15+
**Resample** with **highest quality** setting
16+
17+
```spa-resample -r [48000] -q 14 [input.wav] [output.wav]```
18+
19+
**Resample** with **verbose** output
20+
21+
```spa-resample -v -r [44100] -f [f32] [input.wav] [output.wav]```
22+
23+
# SYNOPSIS
24+
25+
**spa-resample** [_OPTIONS_] _INFILE_ _OUTFILE_
26+
27+
# PARAMETERS
28+
29+
**-r** _RATE_, **--rate=**_RATE_
30+
> Output sample rate.
31+
32+
**-f** _FORMAT_, **--format=**_FORMAT_
33+
> Output sample format (**s8** | **s16** | **s32** | **f32** | **f64**).
34+
35+
**-q** _QUALITY_, **--quality=**_QUALITY_
36+
> Resampler output quality (**0**-**14**). Higher values produce better quality at the cost of more CPU usage.
37+
38+
**-c** _FLAGS_, **--cpuflags=**_FLAGS_
39+
> CPU feature flags for SIMD optimization selection. See spa/support/cpu.h for details.
40+
41+
**-v**
42+
> Verbose operation.
43+
44+
**-h**
45+
> Show help.
46+
47+
# DESCRIPTION
48+
49+
**spa-resample** is a command-line utility that uses the PipeWire SPA resampler to convert audio files from one sample rate and format to another. It reads a WAV input file, applies resampling with the specified parameters, and writes the result to a WAV output file.
50+
51+
The tool is primarily intended for **testing and debugging** the PipeWire resampler implementation rather than as a general-purpose audio conversion tool. It provides direct access to the same resampling algorithm that PipeWire uses internally for audio stream processing, making it useful for verifying resampler behavior and quality.
52+
53+
# CAVEATS
54+
55+
This tool is designed for testing and debugging purposes only, not for production audio conversion workflows. For general-purpose audio format conversion, dedicated tools like **sox** or **ffmpeg** are more appropriate. Only WAV files are supported as input and output formats. The quality parameter range of 0-14 is specific to the PipeWire SPA resampler and does not correspond to quality scales used by other resamplers.
56+
57+
# HISTORY
58+
59+
**spa-resample** is part of the **PipeWire** multimedia framework, which was created by **Wim Taymans** and first released in **2017**. PipeWire was designed as a unified audio and video server to replace both **PulseAudio** and **JACK** on Linux systems. The spa-resample utility provides standalone access to PipeWire's built-in SPA (Simple Plugin API) resampler, which supports multiple SIMD-optimized backends for efficient sample rate conversion.
60+
61+
# SEE ALSO
62+
63+
[pipewire](/man/pipewire)(1), [pw-cli](/man/pw-cli)(1), [pw-cat](/man/pw-cat)(1), [sox](/man/sox)(1), [ffmpeg](/man/ffmpeg)(1)

0 commit comments

Comments
 (0)