Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 459 characters in body
Source Link

I'm trying:

  1. record audio via arecord
  2. live playback using aplay
  3. convert the recorded audio to .flac using flac

Is it possible to perform all three actions simultaneously with the pipe command on command line?

The command i'm trying to use is:

arecord -D plughw:0,0 -d 5 -r 16 -f S16_LE | aplay -f S16_LE | flac - -f --best --sample-rate 16000 -o file.flac

I'm getting this as the error message:

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono ERROR: for encoding a raw file you must specify a value for --endian, --sign, --channels, --bps, and --sample-rate

On adding the recommended values

arecord -D plughw:0,0 -d 5 -r 16 -f S16_LE | aplay -f S16_LE | flac - -f --best --sample-rate 16000 --endian little --sign signed --channels 1 --bps 16 -o file.flac

This is the output I get: Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono (No runtime statistics possible; please wait for encoding to finish...)

soxi file.flac

Input File : 'file.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit Sample Encoding: 16-bit FLAC

I'm trying:

  1. record audio via arecord
  2. live playback using aplay
  3. convert the recorded audio to .flac using flac

Is it possible to perform all three actions simultaneously with the pipe command on command line?

I'm trying:

  1. record audio via arecord
  2. live playback using aplay
  3. convert the recorded audio to .flac using flac

Is it possible to perform all three actions simultaneously with the pipe command on command line?

The command i'm trying to use is:

arecord -D plughw:0,0 -d 5 -r 16 -f S16_LE | aplay -f S16_LE | flac - -f --best --sample-rate 16000 -o file.flac

I'm getting this as the error message:

Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono ERROR: for encoding a raw file you must specify a value for --endian, --sign, --channels, --bps, and --sample-rate

On adding the recommended values

arecord -D plughw:0,0 -d 5 -r 16 -f S16_LE | aplay -f S16_LE | flac - -f --best --sample-rate 16000 --endian little --sign signed --channels 1 --bps 16 -o file.flac

This is the output I get: Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 16000 Hz, Mono (No runtime statistics possible; please wait for encoding to finish...)

soxi file.flac

Input File : 'file.flac' Channels : 1 Sample Rate : 16000 Precision : 16-bit Sample Encoding: 16-bit FLAC

Source Link

RaspberryPi - Audio live playback and record to a flac file

I'm trying:

  1. record audio via arecord
  2. live playback using aplay
  3. convert the recorded audio to .flac using flac

Is it possible to perform all three actions simultaneously with the pipe command on command line?