feat: recording analysis module with Deepgram + AI insights + Redis cache

- RecordingsModule: POST /api/recordings/analyze
- Deepgram pre-recorded API: diarize, summarize, topics, sentiment, utterances
- AI insights via OpenAI generateObject: call outcome, coaching, compliance, satisfaction
- Redis cache: 7-day TTL per callId, check before hitting Deepgram/OpenAI
- Generic getCache/setCache added to SessionService for cross-module use

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-25 09:20:15 +05:30
parent eb4000961f
commit fcc7c90e84
5 changed files with 273 additions and 0 deletions

View File

@@ -50,4 +50,13 @@ export class SessionService implements OnModuleInit {
async unlockSession(agentId: string): Promise<void> {
await this.redis.del(this.key(agentId));
}
// Generic cache operations for any module
async getCache(key: string): Promise<string | null> {
return this.redis.get(key);
}
async setCache(key: string, value: string, ttlSeconds: number): Promise<void> {
await this.redis.set(key, value, 'EX', ttlSeconds);
}
}