All projects

Language and media intelligence

Mistify

A shared AI service for language detection, translation, classification, clustering, and recorded-media analysis.

I designed and built this project independently, using my own resources.

Explore the project

Public repository

Technical documentation

Self-hosted AI service. Setup and API contracts are in the repository.

Technologies

  • Python
  • FastAPI
  • gRPC
  • PyTorch
  • Redis

01 / Context

The problem behind the project

Newsroom applications need to understand multilingual text and recorded media without building a separate model integration for every workflow.

The editorial system needs the same language and content operations in several places: understanding incoming feeds, relating coverage about the same event, translating material, and working with recorded media. I built a shared service so these capabilities do not become separate model integrations inside every application.

The hard problem is not exposing a model behind an endpoint. It is making expensive, asynchronous analysis recoverable and making the result useful to an editorial workflow. A restarted worker, an unavailable consumer, or uncertain speaker attribution must not quietly become a lost job or a fabricated answer.

02 / Implementation

Design and implementation

I build the service and reusable processing components that turn model capabilities into application workflows.

I built independent HTTP helpers and a composable gRPC analysis path around FastText, transformer classifiers and translation models, sentence embeddings, and clustering logic. Monitor supplies its taxonomy and consumes the analysis; the service owns model execution and reusable processing.

The asynchronous worker uses a Redis-backed pending/in-flight lifecycle. An operation is removed only after its callback is acknowledged. Interrupted work is recovered, and exhausted callback delivery returns the original job to pending. This is at-least-once delivery, so consumers must recognize repeated results.

The recorded-media extension persists probe, transcription, diarization, and summary stages independently. It validates immutable source checksums, timecoded results, speaker uncertainty, and citations back to the transcript. Successful stages can be reused after a restart instead of paying for the complete pipeline again.

03 / Architecture

Architecture and workflow

  1. Accept bounded input

    Text helpers accept their operation-specific input. Recorded media is structurally probed and checksummed before expensive work is queued.

  2. Execute reusable analysis

    Language, classification, translation, embedding, and clustering can run independently or through a combined gRPC operation.

  3. Persist progress

    Workers record operation and stage state before and after execution so recovery can skip completed work.

  4. Deliver with acknowledgement

    Callbacks are retried and recovered rather than treated as fire-and-forget. Duplicate results retain their operation identity.

  5. Return evidence-aware output

    Media results carry timecodes and model provenance; unknown speakers and unsupported summary citations remain explicit.

04 / Approach

Engineering decisions

One service, composable operations

Applications can call individual text helpers or submit a combined analysis through gRPC. Language detection, classification, translation, embeddings, and clustering share a service boundary.

Work that survives a restart

Asynchronous operations use Redis-backed state and acknowledged callback delivery. Interrupted work is recovered, and consumers handle repeat delivery idempotently.

Recorded media as a workflow

Transcription, diarization, and source-grounded summarization use durable processing stages rather than one long request.

05 / Evidence

Evidence and outcomes

The recorded-media fixture path exercises HTTP validation, probing, Redis persistence, worker retries, cancellation, provenance, and metrics without downloading production model weights. These checks establish orchestration behavior, not real-model accuracy.

The earlier clustering investigation compared semantic same-event decisions with deterministic embedding/community behavior. The conclusion was to retain explicit provider routing and require labeled event pairs and communities before claiming one model was better. More or fewer clusters alone was not treated as an accuracy result.

Queue depth, callback outcomes, stage failures, and model-resource metrics make it possible to distinguish slow inference from failed delivery or unavailable dependencies.

Source and technical notes

06 / Current scope

Where it stands

Active development across text helpers and recorded-media workflows.

The recorded-media processor seam is intentionally unavailable until an appropriate pinned adapter is configured. Production transcription, diarization, and summarization quality still need representative benchmarks; the durable API does not establish that model acceptance.

Text and media operations have different availability and authorization boundaries. The combined analysis operation is gRPC, not an invented HTTP analyze endpoint. Translation, embeddings, categories, urgency, and clustering remain distinct capabilities.