コンテンツにスキップ

6. VTuberスタジオ

オリジナル$23.7726分51秒カメラ・マイク使用

ノートPCの前に座った人を、バーチャルステージ上のキャラクターに変えるVTuberスタジオです。頭の動き、目、口がリアルタイムで追従します。口は音量に合わせて開閉するのではなく、FFTで第1・第2フォルマントを求めて日本語5母音を判定し、あ・い・う・え・お の形を作ります。

  • 頭部トラッキング:Webカメラのフレーム差分から、頭の位置・向き(ヨー)・傾き(ロール・ピッチ)を推定
  • 母音判定:マイク入力にFFTをかけ、第1・第2フォルマントから あ・い・う・え・お のどれを発音しているか判定。アバターの口がその形になる
  • トラッキングパネル:ヨー・ピッチ・ロール(度)、まばたき回数、判定した母音と確信度、入力レベル、トラッキング遅延(ミリ秒)、フレームレート
  • 母音チャート:第1・第2フォルマントを点としてプロット。5母音の領域が示されているので、しゃべると点が正しい領域に入るのが見える
  • 左右反転したカメラ映像に、トラッキング結果を重ねて表示
  • キャラクターはすべてコードで描画(画像なし)。髪と服が物理で揺れ、静止していると自分で呼吸・まばたきをする
  • ステージの照明、流れるコメント、口を大きく開けたり頭を強く傾けたときに出るリアクション演出
  • キャラクターデザインと背景の切り替え
Create a VTuber studio that turns whoever sits in front of the laptop into an animated character on a virtual stage, stage-worthy and readable from across a room, with the avatar's head, eyes and mouth following the real person in real time.
Use the webcam to track the head — its position, how far it is turned and how far it is tilted — by comparing successive frames and analysing the image yourself, and use the microphone to drive the mouth: run your own FFT, find the first two formants, and decide which of the five Japanese vowels is being spoken, so the character's mouth actually forms あ, い, う, え or お rather than simply opening and closing with the volume.
Beside the stage show a live tracking panel: head yaw, pitch and roll in degrees, a blink counter, the detected vowel with your confidence in it, the input level, the tracking latency in milliseconds and the frame rate; also plot the first and second formants as a moving point on a vowel chart with the five Japanese vowel regions marked, so I can watch the point land in the right region as I speak, and show my mirrored webcam view with the tracking drawn over it.
Draw the character entirely in code — no images, no external assets — as a soft two-dimensional avatar whose hair and clothing swing with a little physics as the head moves, breathing and blinking on its own when I hold still, and give me a stage with lighting, a comment stream scrolling across the screen, and a reaction effect that fires when I open my mouth wide or tilt my head hard. Let me switch between two or three character designs and change the background. Build it as one self-contained HTML file with no external libraries or assets, and keep it at 60 fps so the avatar never feels laggy.
項目トークン料金
入力1,830$0.02
出力329,159$16.46
キャッシュ書き込み394,886$4.94
キャッシュ読み込み9,423,921$2.36
合計10,149,796$23.77

所要時間 26分51秒 / モデル claude-fable-5-1