Skip to main content

Glossary

The vocabulary you will hear in PR review, design docs, and the on-call channel. Skim it once; come back as needed.

Product & domain

TermMeaning
CallOne recorded phone conversation. The smallest unit of work in Scryon. Has a stable callId.
Call recordThe Postgres row in call_records representing a call's metadata and lifecycle state.
Call artifactA derived file produced by the pipeline (preprocessed audio, raw transcript, normalised transcript, analysis JSON). Stored in object storage.
Action itemA structured TODO extracted from a call's analysis. Has text, owner*, optional dueDate, status (PENDING / COMPLETED), and sourceSegmentIds.
DirectionINCOMING / OUTGOING / UNKNOWN. Influences default speaker resolution.
USER / CONTACTThe two role values for a real speaker. USER = the owner of the phone (the Scryon user). CONTACT = the other party.

Pipeline stages

TermMeaning
Preprocessingffmpeg pass: mono, 16 kHz, loudness-normalise, high-pass filter, optional afftdn denoise.
Diarization"Who spoke when." Produces [speakerId, t0, t1] segments. Provider: pyannoteAI.
Transcription"What was said." Produces [word, startMs, endMs]. Provider: Lemonfox / Whisper.
AlignmentStitches diarization segments and transcription words into [{speakerId, text, t0, t1}].
NormalisationProduces our stable, versioned transcript schema (v3). The client never sees raw provider output.
Speaker resolutionMapping anonymous speaker_0 / speaker_1 to role + displayName using layered evidence.
AnalysisLLM step: summary, detailed summary, key points, sentiment, action items.
Action item extractionPersisting analysis action items as action_items rows with stable owners.

Speaker resolution vocabulary

TermMeaning
LabelSourceEnum recording why we picked a label: VOICE_EMBEDDING, GREETING_MATCH, MENTION_ASYMMETRY, BY_ELIMINATION, DIRECTION, PHONE_FALLBACK, POSITIONAL_FALLBACK, AMBIGUOUS, MANUAL.
ConfidenceHIGH / MEDIUM / LOW. Voice embedding and explicit greeting matches are HIGH; positional fallback is LOW.
Greeting matchSpeaker introduces themselves in the first N seconds (e.g. "Hi, this is Priya").
Mention asymmetryOnly one speaker mentions a candidate name; the other never does.
By eliminationIf we are confident about one of two speakers, the other is set by elimination.
Direction tiebreakerWhen direction is INCOMING, the first speaker is more likely USER; OUTGOING flips that.
Positional fallbackLast-resort heuristic for 2-speaker calls when no other evidence resolves anyone. Always LOW confidence.
Voice profileAn opt-in voice embedding for the current user. Used to mark a speaker as USER with labelSource=VOICE_EMBEDDING.

Backend stack

TermMeaning
WebClientSpring's reactive HTTP client. Used for all external provider calls.
FlywayDatabase migration tool. Migrations live in db/migration/V<n>__*.sql.
MDC"Mapped Diagnostic Context." Per-request key/value pairs that appear on every log line. Carries callId, userId, requestId.
MicrometerSpring's metrics façade. Backed by Prometheus in prod.
OpenTelemetry / OTLPDistributed tracing. Spans cover every pipeline stage.
SentryError tracking. Events are scrubbed for PII before send.
AnalysisPipelineThe orchestrator service that runs the stages above. Idempotent and resumable.
CallIntakeServiceThe boundary that turns an HTTP upload into a call_records row + queued pipeline run.
Idempotency-KeyUUID per upload target; backend dedupes for 24 h.

Android stack

TermMeaning
CallRecordingScannerHeuristically classifies a MediaStore.Audio row as a call recording.
CallUploadWorkerThe Hilt-injected CoroutineWorker that owns the durable upload critical path. Runs as a foreground service.
CallUploadEnqueuerThe single entry point that writes the queue store and enqueues the worker.
InFlightUploadStorecallId ↔ mediaId bindings for accepted-but-not-terminal uploads.
IdempotencyKeyStoreUUID per upload target, 24 h TTL, retained across worker retries.
UploadQueueStoreRecordings the user tapped Transcribe on that the backend has not yet accepted. Drives the synthetic "Uploading" row.
DismissedCallStoreBackend callIds the user cancelled mid-analysis. Excluded from polling.
CallContentCacheOn-disk JSON cache of transcript + analysis for COMPLETED calls. Wiped on sign-out.
FirebaseIdTokenProviderSingleton that caches the Bearer token (~50 min) and serialises fetches.
AuthGateCompose composable that gates the app's main shell on AuthRepository.state.

Reliability & quality

TermMeaning
IdempotentDoing it twice produces the same result. Applied to upload accept, pipeline stages, and worker retries.
Foreground serviceAn Android service with a persistent notification. Survives app kill. The upload worker promotes to one after ~4 s grace.
Per-uid namespacingEvery local store is keyed by Firebase uid so two accounts on one device cannot collide.
Feature flagEnv var (or backend flag) that gates a feature. Default off in dev. Examples: PYANNOTE_ENABLED, SCRYON_VOICE_EMBEDDING_ENABLED.
Stub providerA non-network implementation of an external provider used in local dev and tests.
TestcontainersLibrary that spins up real Postgres in tests. Used in backend service tests.

API conventions

TermMeaning
X-API-KeyShared secret header on every backend request.
Authorization: Bearer <token>Firebase ID token. Required on all endpoints except /api/health.
Idempotency-KeyUUID per upload. Backend dedupes for 24 h.
schemaVersionEmbedded in transcript JSON. We are on 2; 3 is in design.
labelSourcePer-speaker field explaining how we picked the role/name. Plumbed end-to-end.

Privacy vocabulary

TermMeaning
PIIPersonally identifiable information. Names, phone numbers, transcript text, audio.
MaskingReducing PII to a safe representation. Phone numbers become +91 98***45 in logs.
ScrubberSentry's pre-send filter that drops PII fields from exception payloads.
Hard deleteNo soft-delete window. Row, artifacts, and embeddings are gone immediately.
Opt-inOff by default. The user must explicitly enable it. Voice profile, call-log enrichment, notifications.

Acronyms

TermMeaning
ADRArchitecture Decision Record. See the template.
PRPull request.
DTOData Transfer Object. The shape on the wire. Lives in data/remote/dto/.
VMViewModel (Android).
JWTJSON Web Token. The Firebase ID token is a JWT.
SLO / SLAService Level Objective / Agreement.