snr

Functions

int main(int argc, char *argv[])

snr [ option ] file1 [ infile ]

  • -l int

    • frame length (1L)

  • -o int

    • output type (0O2)

      • 0 SNR

      • 1 segmental SNR

      • 2 segmental SNR per frame

  • file1 str

    • double-type signal sequence, x1

  • infile str

    • double-type signal+noise sequence, x2

  • stdout

    • double-type SNR

The inputs of this commands are two signals:

x1(0),x1(1),,x1(T1),x2(0),x2(1),,x2(T1).
If O=2, segmental SNR is calculated and output at every frame:
y(0),y(1),,y(N1),
where N=(T1)/L and
y(n)=10log10l=0L1{x1(nL+l)}2l=0L1{x2(nL+l)x1(nL+l)}2.
If O=1, the output is averaged segmental SNR:
y=1Nn=0N1y(n).
If O=0, the output is a standard SNR:
y=10log10t=0T1{x1(t)}2t=0T1{x2(t)x1(t)}2.

Parameters:
  • argc[in] Number of arguments.

  • argv[in] Argument vector.

Returns:

0 on success, 1 on failure.

See also

rmse