Debianで音声出力の調整をして見ました。こちらのサイトを参考にしました。
PulseAudio で音量を調整する
それはうまく行きまして、音量70%に変更するときは
shell
1pacmd set-sink-volume @DEFAULT_SINK@ 0xb400
とすればいい事がわかりました。
今度は**音声入力**を調整するShellScriptを流すときの方法を探しています。
「マイクの感度を50%にするには」といった感じです。
どなたかご存知の方はいらっしゃいませんでしょうか。
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
回答2件
0
自己解決
このサイトが役立ちました。
コマンドラインからデフォルトのオーディオデバイスを変更するにはどうすればよいですか?
You can control PulseAudio thoroughly through the command line using pacmd and pactl commands. For options see man pages or the wiki at PulseAudio:
shell
1pacmd list-sinks ( or pactl list short sinks ) for name or index number of possible sinks 2 3pacmd set-default-sink "SINKNAME" to set the default output sink 4 5pacmd set-default-source "SOURCENAME" to set the default input 6 7pacmd set-sink-volume index volume 8 9pacmd set-source-volume index volume for volume control (65536 = 100 %, 0 = mute; or a bit more intuitive 0x10000 = 100 %, 0xC000 = 75 %, 0x0 = 0 %)
特に役立ったのは、
shell
1pacmd set-source-volume < index > < volume >
< volume >
100%:0x10000[16進] = 65536[10進]
50%: 0x8000[16進] = 32768[10進]
私はマイク入力感度50%にしたかったので、
shell
1pacmd set-source-volume < index > 0x8000 2# < index >はそれぞれ機器による
とすることでうまくいきました。
追加情報
上記ご紹介しましたwebサイトの元ネタは以下の WebSite のようです。
How can I change the default audio device from command line?
Ubuntu's desktop gui is great for changing audio settings (System->Preferences->Sound), like the default input/output device and setting the volume.
However, I would like to be able to do these things from the command-line. What tool is the gui using behind the scenes?
Answer
You can control PulseAudio thoroughly through the command line using pacmd and pactl commands. For options see pacmd --help or the wiki at PulseAudio:
shell
1pacmd list-sinks for name or index number of possible sinks 2 3pacmd list-sources for name or index number of possible sources 4 5pacmd set-default-sink "SINKNAME" | index to set the default output sink 6 7pacmd set-default-source "SOURCENAME" | index to set the default input 8 9pacmd set-sink-volume index volume
投稿2021/11/05 12:07
編集2021/11/05 12:36総合スコア9
0
たぶんpacmd set-sink-input-volume 0 100
でいけます。0がインデックスの値で100は設定値です。
投稿2021/11/04 21:24
退会済みユーザー
総合スコア0
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
退会済みユーザー
2021/11/05 12:00
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。