feat: preserve stereo channels and require reviewed speaker roles
This commit is contained in:
@@ -107,6 +107,11 @@ final class FollowupAudioProviderConfig
|
||||
$chunkSeconds = (int) ($settings['asr_chunk_seconds'] ?? 120);
|
||||
if ($chunkSeconds < 1 || $chunkSeconds > 120) { throw new FollowupAudioException('CONFIG_INVALID'); }
|
||||
$resolved['chunk_seconds'] = $chunkSeconds;
|
||||
$stereoSeconds = (int) ($settings['asr_stereo_chunk_seconds'] ?? 15);
|
||||
if ($stereoSeconds < 1 || $stereoSeconds > 30) { throw new FollowupAudioException('CONFIG_INVALID'); }
|
||||
$resolved['stereo_chunk_seconds'] = $stereoSeconds;
|
||||
$resolved['channel_policy'] = FollowupAudioPipelineCheckpoint::CHANNEL_POLICY;
|
||||
$resolved['silence_policy'] = FollowupAudioPipelineMedia::SILENCE_POLICY;
|
||||
$mode = $provider['extraction']['response_format'] ?? 'json_schema';
|
||||
$maxTokens = $provider['extraction']['max_tokens'] ?? 8192;
|
||||
$thinking = $provider['extraction']['enable_thinking'] ?? null;
|
||||
@@ -122,7 +127,7 @@ final class FollowupAudioProviderConfig
|
||||
throw new FollowupAudioException('CONFIG_INVALID');
|
||||
}
|
||||
$resolved['fingerprint'] = hash('sha256', json_encode([$resolved['driver'], $resolved['asr'], $resolved['extraction'],
|
||||
$allowLoopback, $chunkSeconds, 'pcm-s16le-mono-16000-v1', $resolved['output_schema'], $resolved['citation_policy'], $resolved['schema_dialect']], JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR));
|
||||
$allowLoopback, $chunkSeconds, 'pcm-s16le-mono-16000-v1', $resolved['output_schema'], $resolved['citation_policy'], $resolved['schema_dialect'], $resolved['channel_policy'], $stereoSeconds, $resolved['silence_policy'], 'checkpoint-v2'], JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR));
|
||||
return $resolved;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user