true, 'message' => 'Mock provider: no external call is made.']; } public function analyse(AiVoiceProvider $provider, array $chunks, array $context): array { $linkedid = (string) ($context['linkedid'] ?? 'unknown'); $direction = (string) ($context['direction'] ?? 'call'); $bytes = 0; foreach ($chunks as $chunk) { $bytes += (int) @filesize($chunk); } $transcript = "Speaker A: This is a mock transcription for {$direction} call {$linkedid}. " ."No audio was sent to any provider.\n" .'Speaker B: Understood. The recording was prepared and the job ran through the full pipeline.'; $summary = "Mock summary for {$direction} call {$linkedid}: the analysis pipeline ran end to end " .'without contacting a provider. Audio prepared: ' . count($chunks) . ' chunk(s), ' . $bytes . ' bytes. ' .'Select a real provider on the AI Voice Analysis settings page and save its API key to replace this text.'; return [ 'transcript' => $transcript, 'summary' => $summary, 'meta' => ['driver' => 'mock', 'chunks' => count($chunks)], ]; } }