0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

PipeWire でボイスチェンジャー仮想マイクを作る(失敗)

0
Last updated at Posted at 2026-06-30

今回は前回のPipeWire でピッチシフト仮想マイクの続きです。 Pipewire の Filter-Chain モジュールを経由してボイスチェンジャーVSTプラグインを使いたい、でも失敗、みたいな感じです。

まずは設定用のCarla本体、プラグインブリッジのCarla LV2プラグイン、Windows x64 VSTプラグインを使うためのcarla-bridge-win64をインストールします。

$ sudo apt install carla carla-lv2 carla-bridge-win64

またUbuntu 24.04の場合はLV2に対応している新しいバージョンのpipewireをインストールします。

$ sudo add-apt-repository ppa:pipewire-debian/pipewire-upstream
$ sudo apt update
$ sudo apt install pipewire

ボイスチェンジャーのVSTをダウンロードします。今回はとりあえず「Beatrice」と「つくよみちゃん」を使います。以下からVer. 2.0.0-rc.2 の Windows 版と「公式モデル 1」をダウンロードして解凍してください。
https://prj-beatrice.com/

次にCarlaをpw-jackを通して起動します。

$ pw-jack carla

Carlaを開いたらメニューのSettings⇢「Configure Carla」をクリックして設定を開き、設定内の Main タブの Experimental 内の「Enable experimental features」を有効にして、それによって出てきた Experimental タブの「Export single plugins to LV2」を有効にします。

設定を閉じてメインウインドウのPatchbayタブを開いたら入力ノードと出力ノードをCarlaノードを挟んで繋ぎます。次にRackタブへと切り替えてBeatraceのVST3ファイルをドラッグ&ドロップ。Beatraceが追加されたら歯車アイコンを押して、Beatraceの設定ダイアログを開きます。

Beatraceの設定ダイアログではまずModelをクリックして、ファイル選択が開いたら公式モデルのtomlを選択。Beatraceのモデルが認識されたらVoiceを選択し、他のパラメータを調整していきます。調整が終わったらダイアログを閉じて、RackにあるBetraceを右クリックし、「Export LV2...」を押してBeatraceをLV2プラグインとしてエクスポートします。

LV2プラグインができたのでPipeWireからそれを使うための設定に移ります。まずは自分のマイクのIDを確認します。

$ pw-link -o | grep alsa_input
alsa_input.usb-Razer_Razer_Kraken_Kitty_Edition_00000000-00.analog-stereo:capture_FL
alsa_input.usb-Razer_Razer_Kraken_Kitty_Edition_00000000-00.analog-stereo:capture_FR
alsa_input.pci-0000_00_1f.3.analog-stereo:capture_FL
alsa_input.pci-0000_00_1f.3.analog-stereo:capture_FR

次にボイスチェンジャー後の仮想入力を作る設定を用意します(node.targetは上記で調べた自分のマイクのIDに、pluginは自分のディレクトリに変更してください)。

~/.config/pipewire/pipewire.conf.d/voicechanger.conf
context.modules = [
    {
        name = libpipewire-module-filter-chain
        args = {
            node.description = "VoiceChanger Sink"
            media.name       = "VoiceChanger Sink"
            filter.graph = {
                nodes = [
                    {
                        type = lv2
                        name = "Beatrice_2.0.0-rc.2"
                        plugin = "file:///home/xxx/.lv2/Beatrice_2.0.0-rc.2.lv2/Beatrice_2_0_0_rc_2.ttl"
                        label = "Beatrice_2.0.0-rc.2"

                        control = {
                        }
                    }
                ]
                links = []
            }
            audio.channels = 2
            capture.props = {
                node.name   = "voicechanger_input"
                node.target = "alsa_input.usb-Razer_Razer_Kraken_Kitty_Edition_00000000-00.analog-stereo"
                stream.dont-remix = true
                node.passive = true
                node.latency = "256/48000"
                audio.position = [ FL FR ]
            }
            playback.props = {
                node.name = "voicechanger_output"
                media.class = "Audio/Source"
                audio.position = [ FL FR ]
                node.latency = "256/48000"
            }
        }
    }
]

その後、pipewire と wireplumber を再起動します。

$ systemctl --user restart pipewire
$ systemctl --user restart wireplumber

以下のコマンドで pipewire が active になっていることを確認してください:

$ systemctl --user status pipewire
● pipewire.service - PipeWire Multimedia Service
     Loaded: loaded (/usr/lib/systemd/user/pipewire.service; enabled; preset: enabled)
     Active: active (running) since Tue 2026-06-30 13:56:05 JST; 21min ago
[...]

次に PipeWire のループバックを低レイテンシで実行して普通のループバックがうまく動いてるか確認します。

$ sudo renice -19 `pidof pipewire`
$ sudo chrt -r -p 99 `pidof pipewire`
$ export PIPEWIRE_LATENCY="256/48000"
$ pw-loopback -l 0&
$ sudo chrt -r -p 99 $!
$ sudo renice -19 $!

その後、pavucontrolmate-volume-control で入力を VoiceChanger Sink に切り替えてボイスチェンジャー後の入力をループバックしようとします。

失敗します。

$ journalctl --user -u pipewire -b --no-pager
[...]
6月 30 17:36:08 ubuntu-1 pipewire[1626532]: [carla] Failed to load a plugin 'Beatrice_2.0.0-rc.2', error was:
6月 30 17:36:08 ubuntu-1 pipewire[1626532]: Timeout while waiting for a response from plugin-bridge
6月 30 17:36:08 ubuntu-1 pipewire[1626532]: (or the plugin crashed on initialization?)
6月 30 17:36:08 ubuntu-1 pipewire[1626532]: [carla] Carla assertion failure: "pData->curPluginCount == 1" in file CarlaBridgeSingleLV2.cpp, line 103
[...]

調べたら以下のCarlaのバグのようです:

yabridgeを噛ませばバグを迂回できるという情報もありますが、yabridgeにはwine-stagingが必要らしいので一旦保留にします。

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?