45 lines
2.8 KiB
PHP
45 lines
2.8 KiB
PHP
<?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,
|
|
// HTTP is permitted only for explicitly acknowledged synthetic probes, never patient requests.
|
|
'allow_insecure_synthetic' => filter_var(env('followup_audio.ALLOW_INSECURE_SYNTHETIC', false), FILTER_VALIDATE_BOOLEAN),
|
|
// Stable logical slots preserve task schema. No model identifier or supplier is hardcoded.
|
|
'providers' => array_combine(['qwen', 'openai'], array_map(static function (string $profile): array {
|
|
$prefix = 'followup_audio.' . strtoupper($profile) . '_';
|
|
return [
|
|
'driver' => (string) env($prefix . 'DRIVER', 'dify'),
|
|
// Only the dify driver may reuse empty base/key fields from prescription_ai.
|
|
'base_url' => (string) env($prefix . 'BASE_URL', ''),
|
|
'api_key' => (string) env($prefix . 'API_KEY', ''),
|
|
'model' => (string) env($prefix . 'MODEL', ''),
|
|
'label' => (string) env($prefix . 'LABEL', $profile),
|
|
'verified_fingerprint' => (string) env($prefix . 'VERIFIED_FINGERPRINT', ''),
|
|
];
|
|
}, ['qwen', 'openai'])),
|
|
];
|