LoginSignup
13
8

More than 5 years have passed since last update.

Linuxでマイクの音量が小さいときに、それを上げる方法

Last updated at Posted at 2018-03-31

Raspberry Pi 3 にUSBのマイクをさして使用している。

$ arecord -l
**** List of CAPTURE Hardware Devices ****
card 1: Device [USB PnP Sound Device], device 0: USB Audio [USB Audio]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

このマイクから音声が入ってこない。マイクのボリュームが0になっている。

$ amixer -D hw:1
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 16
  Mono: Capture 0 [0%] [0.00dB] [on]
Simple mixer control 'Auto Gain Control',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

マイクのボリュームを100%にセットする。

$ amixer -D hw:1 sset Mic 100%
Simple mixer control 'Mic',0
  Capabilities: cvolume cvolume-joined cswitch cswitch-joined
  Capture channels: Mono
  Limits: Capture 0 - 16
  Mono: Capture 16 [100%] [23.81dB] [on]

試しに録音。 -Vmono でモノラルのVUメーターが表示される。

arecord -Vmono -D hw:1 -f S16_LE -c1 -r48000 /tmp/a.wav

再生の音量を上げる。

$ amixer -c0 sset PCM 100% unmute
Simple mixer control 'PCM',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback -10239 - 400
  Mono: Playback 400 [100%] [4.00dB] [on]

再生。アナログのヘッドホン端子から音が出る。

aplay /tmp/a.wav

関連

PCMのデータを自分でいじってデジタルオーディオを理解する

13
8
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
13
8