#navi(linux関連);



*For ubuntu [#yd4fd396]
-sudo apt-get update
-sudo aptitude install alsa-utils alsa-driver sox sqlite3~
-sudo aptitude install alsa sox sqlite3~
-sudo vi /etc/group
 audio: に使用するユーザを追加する

*memo [#q0a1394e]
echo "arecord -t wav -d 4200 -r 24000 today_oita.wav && yes | rm /home/hamada/*.wav && cp today_oita.wav /home/hamada" | at 14:54 06/15/2009

*lame [#n9331e24]
http://lame.cvs.sourceforge.net/*checkout*/lame/lame/USAGE

*alsamixer [#cfa3ce61]
#ref(alsamixer.png);

*amixer [#h0137b78]


*hint [#we9af47b]
-http://academic.meganebu.com/~debug_ito/index.php?Ubuntu%2FHardy%A5%A4%A5%F3%A5%B9%A5%C8%A1%BC%A5%EB%A5%E1%A5%E2
-http://www2h.biglobe.ne.jp/~hnakamur/technolab/linux/sound/rec/rec2.htm
-http://www.e-obs.com/Pro/Radio/Sv1/index.htm
-http://q.hatena.ne.jp/1192345628
-http://www.yolinux.com/TUTORIALS/LinuxTutorialMP3.html
-http://blog.goo.ne.jp/nobody123/e/cb86aa95ebf15eddda01b5d33467510c
-http://www.atmarkit.co.jp/flinux/rensai/linuxtips/153makemp3.html
-http://flowernet.jp/blog/masm/?date=20080622



*arecord --h [#dde9b000]
Usage: arecord [OPTION]... [FILE]...
 
 -h, --help              help
     --version           print current version
 -l, --list-devices      list all soundcards and digital audio devices
 -L, --list-pcms         list device names
 -D, --device=NAME       select PCM by name
 -q, --quiet             quiet mode
 -t, --file-type TYPE    file type (voc, wav, raw or au)
 -c, --channels=#        channels
 -f, --format=FORMAT     sample format (case insensitive)
 -r, --rate=#            sample rate
 -d, --duration=#        interrupt after # seconds
 -s, --sleep-min=#       min ticks to sleep
 -M, --mmap              mmap stream
 -N, --nonblock          nonblocking mode
 -F, --period-time=#     distance between interrupts is # microseconds
 -B, --buffer-time=#     buffer duration is # microseconds
     --period-size=#     distance between interrupts is # frames
     --buffer-size=#     buffer duration is # frames
 -A, --avail-min=#       min available space for wakeup is # microseconds
 -R, --start-delay=#     delay for automatic PCM start is # microseconds 
                         (relative to buffer size if <= 0)
 -T, --stop-delay=#      delay for automatic PCM stop is # microseconds from xrun
 -v, --verbose           show PCM structure and setup (accumulative)
 -I, --separate-channels one file for each channel
 : S8 U8 S16_LE S16_BE U16_LE U16_BE S24_LE S24_BE U24_LE U24_BE S32_LE S32_BE U32_LE U32_BE FLOAT_LE FLOAT_BE FLOAT64_LE FLOAT64_BE IEC958_SUBFRAME_LE IEC958_SUBFRAME_BE MU_LAW A_LAW IMA_ADPCM MPEG GSM SPECIAL S24_3LE S24_3BE U24_3LE U24_3BE S20_3LE S20_3BE U20_3LE U20_3BE S18_3LE S18_3BE U18_3LE
 
 :
 -f cd (16 44100)
 -f cdr (16 44100)
 -f dat (16 48000)

sox: SoX v14.0.0
 
 Failed: Not enough input filenames specified
 
 Usage summary: [gopts] [[fopts] infile]... [fopts] outfile [effect [effopts]]...
 
 SPECIAL FILENAMES:
 -               stdin (infile) or stdout (outfile)
 -n              use the null file handler; for use with e.g. synth & stat
 
 GLOBAL OPTIONS (gopts) (can be specified at any point before the first effect):
 --buffer BYTES  set the buffer size (default 8192)
 --combine concatenate  concatenate multiple input files (default for sox, rec)
 --combine sequence  sequence multiple input files (default for play)
 -h, --help      display version number and usage information
 --help-effect NAME  display usage of specified effect; use `all' to display all
 --interactive   prompt to overwrite output file
 -m, --combine mix  mix multiple input files (instead of concatenating)
 -M, --combine merge  merge multiple input files (instead of concatenating)
 --plot gnuplot|octave  generate script to plot response of filter effect
 -q, --no-show-progress  run in quiet mode; opposite of -S
 --replay-gain track|album|off  default: off (sox, rec), track (play)
 -R              use default random numbers (same on each run of SoX)
 -S, --show-progress  display progress while processing audio data
 --version       display version number of SoX and exit
 -V[LEVEL]       increment or set verbosity level (default 2); levels are:
                   1: failure messages
                   2: warnings
                   3: details of processing
                   4-6: increasing levels of debug messages
 
 FORMAT OPTIONS (fopts):
 Format options only need to be supplied for input files that are headerless,
 otherwise they are obtained automatically.  Output files will default to the
 same format options as the input file unless otherwise specified.
 
 -c, --channels CHANNELS  number of channels in audio data
 -C, --compression FACTOR  compression factor for output format
 --comment TEXT  Specify comment text for the output file
 --comment-file FILENAME  file containing comment text for the output file
 --endian little|big|swap  set endianness; swap means opposite to default
 -r, --rate RATE  sample rate of audio
 -t, --type FILETYPE  file type of audio
 -x              invert auto-detected endianness
 -N, --reverse-nibbles  nibble-order
 -X, --reverse-bits  bit-order of data
 -B/-L           force endianness to big/little
 -s/-u/-U/-A/    sample encoding: signed/unsigned/u-law/A-law
   -a/-i/-g/-f   ADPCM/IMA_ADPCM/GSM/floating point
 -1/-2/-3/-4/-8  sample size in bytes
 -v, --volume FACTOR  volume input file volume adjustment factor (real number)
 
 SUPPORTED FILE FORMATS: 8svx aif aifc aiff aiffc al alsa au auto avr cdda cdr cvs cvsd dat dvms fssd hcom ima ircam la lpc lpc10 lu m3u maud nist nul null pls prc raw s1 s2 s3 s4 sb sf sl smp snd sndt sou sph sw txw u1 u2 u3 u4 ub ul uw vms voc vox wav wve xa
 
 SUPPORTED EFFECTS: allpass band bandpass bandreject bass chorus compand dcshift deemph dither earwax echo echos equalizer fade filter flanger highpass key ladspa lowpass mcompand mixer noiseprof noisered oops pad pan phaser polyphase rabbit repeat resample reverb reverse silence speed stat swap synth tempo treble tremolo trim vol
 
 effopts: depends on effect




 #!/bin/bash
 rectime=`date +%Y%m%d_%H%M_$1min`
 rec=$rectime.wav
 rec_mp3=$rectime.mp3
 rec_s=s_$rectime.wav
 rec_smp3=s_$rectime.mp3
 rec_duration=$[$1*60]
 form=S16
 chan=2
 log_a=`date +%m%d`
 
 
 arecord -t wav -d $rec_duration -f $form -c $chan -r 48000 $rec
 lame -V2 $rec $rec_mp3
 log_d=`ls -lh $rec | sed "s/ /,/g" | cut -d , -f5`
 
 sox $rec $rec_s speed 1.5
 lame -V2 $rec_s $rec_smp3
 
 yes y | rm $rec $rec_s 
 
 mv $rectime.* /var/www/sound/$2
 mv $rec_smp3 /var/www/sound/$2
 log_char="insert into log values (1,2,3 , \"$log_d\" , $1 , \"$2\" );"
 echo $log_char |sqlite3 reclog
 /root/sqltohtml.sh > /var/www/sound/list.html

トップ   編集 差分 バックアップ 添付 複製 名前変更 リロード   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS