0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

MacOSのシステム音声を使いたい(BlackHoleのインストール)

Posted at

BlackHoleについて

macOSはプライバシーとセキュリティ上の理由から音声キャプチャに制限を設けているため、システムオーディオ出力を直接録音できる機能がデフォルトで搭載されていません。

そのためBlackHole(仮想オーディオデバイス)を使用して、音声を取得します。

インストール方法

  1. Homebrewのインストール
    BlackHoleを取得するには先にHomebrewをインストールする必要があります。
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    

  2. インストール後以下の内容が表示されるので、順次実行
    Next steps:
    
    Run these commands in your terminal to add Homebrew to your PATH:
    
        echo >> /Users/<YourUserName>.zprofile
    
        echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/<YourUserName>.zprofile
    
        eval "$(/opt/homebrew/bin/brew shellenv)"
    

  3. 正しくインストールされているかの確認
    brew --version
    
    出力結果例
    Homebrew 4.4.19
    

  4. BlackHoleのインストール
    自分の環境や設定した仮想環境などにインストールする
    (chは2, 8, 64があるので、必要なchをインストールしてください)
    brew install blackhole-2ch
    

  5. 正しくインストールされているかの確認
    brew list
    
    出力結果例
    ==> Formulae
    ~~~~~~~~~~~~~(なんか色々出てくる)~~~~~~~~~~~~~~~~~~
    ==> Casks
        blackhole-2ch
    

システム設定

インストールしたBlackHoleを使えるようにするには、システムの出力設定にBlackHoleを設定する必要があります。

  1. Finderで「Audio MIDI設定」と検索し開く
  2. 左下の+を押下し「複数出力装置を作成」を選択

image.png
3. BlackHoleとシステムのスピーカーを選択
image.png
4. サウンドでその出力を選択
image.png

これで、BlackHoleを利用してシステムの音声を取得する準備ができました。音声編集ツールやsounddeviceライブラリなどからアクセスできます。

0
2
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
0
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?