feat: preserve stereo channels and require reviewed speaker roles

This commit is contained in:
2026-10-08 16:15:41 +08:00
parent 13948f5982
commit a20d3565af
28 changed files with 1134 additions and 113 deletions
@@ -57,7 +57,7 @@ $transport = static function (array $spec, callable $heartbeat) use (&$calls, &$
return ['http_code' => 200, 'errno' => 0, 'body' => json_encode(['choices' => [['finish_reason' => $mode === 'length' ? 'length' : 'stop', 'message' => $message]]])];
};
$make = static function () use ($f, &$active, &$allTasks): int {
$samples = str_repeat(pack('v', 0), 48000 - 1) . random_bytes(2);
$samples = str_repeat(pack('v', 1000), 48000 - 1) . random_bytes(2);
$wav = 'RIFF' . pack('V', 36 + strlen($samples)) . 'WAVEfmt ' . pack('VvvVVvv', 16, 1, 1, 16000, 32000, 2, 16) . 'data' . pack('V', strlen($samples)) . $samples;
$source = $f['private'] . '/fixture.wav'; file_put_contents($source, $wav); chmod($source, 0600);
$upload = followupAudioTestUpload($f, $source, 'synthetic.wav');