feat: add reviewed follow-up audio patient enrichment

This commit is contained in:
2026-09-29 15:44:30 +08:00
parent 3cdc812f2b
commit 70be2fc70f
46 changed files with 7384 additions and 246 deletions
+30
View File
@@ -0,0 +1,30 @@
<?php
/** Audio is deliberately OFF until the synthetic short/15m/1h gate passes for the current app. */
return [
'enabled' => filter_var(env('followup_audio.ENABLED', false), FILTER_VALIDATE_BOOLEAN),
'audio_verified' => filter_var(env('followup_audio.AUDIO_VERIFIED', false), FILTER_VALIDATE_BOOLEAN),
// Each selected application must separately pass all three synthetic fixtures.
'verified_profiles' => array_values(array_intersect(['qwen', 'openai'], array_filter(array_map('trim',
explode(',', (string) env('followup_audio.VERIFIED_PROFILES', '')))))),
// LLM-suggested media offsets are not reliable ASR alignment; leave off until separately verified.
'timestamp_verified' => false,
'profile' => (string) env('followup_audio.PROFILE', 'qwen'),
'max_bytes' => 524288000,
'max_seconds' => 3600,
'chunk_bytes' => 2097152,
'retention_days' => 90,
'lease_seconds' => 600,
'request_timeout' => (int) env('followup_audio.REQUEST_TIMEOUT', 240),
'concurrency' => max(1, min(8, (int) env('followup_audio.CONCURRENCY', 1))),
// Keep one stable key across web/worker nodes; empty reuses the existing prescription AI key.
'encryption_key' => (string) env('followup_audio.ENCRYPTION_KEY', ''),
'private_dir' => runtime_path() . 'private/followup_audio',
// Original upload stays <=500 MiB. The same Dify app receives at most this private processing copy.
'upstream_max_bytes' => (int) env('followup_audio.UPSTREAM_MAX_BYTES', 20971520),
'normalize_timeout' => (int) env('followup_audio.NORMALIZE_TIMEOUT', 120),
'ffmpeg' => (string) env('followup_audio.FFMPEG', 'ffmpeg'),
'ffprobe' => (string) env('followup_audio.FFPROBE', 'ffprobe'),
'max_response_bytes' => 8388608,
// No audio-specific provider key or fallback: prescription_ai.base_url/models are reused.
];