HISTORICAL 2024 PROTOTYPE

Voice-Operated AI & RAG Investment Assistant

A 2024 voice-operated AI prototype combining local speech recognition, retrieval, financial data, language-model reasoning and streamed speech output in an end-to-end interaction loop.

Voice AILocal ASRRAGFinancial DataStreaming TTS

Problem Class

How can a user ask investment-related questions by voice and receive contextual responses without manually navigating data sources and interfaces?

Engineering Challenge

The system had to coordinate microphone capture, local speech recognition, request handling, retrieval, financial-data access, model reasoning, response generation and speech synthesis across a web application.

Architecture

The 2024 implementation separated voice input, local transcription, retrieval and provider-backed reasoning into explicit stages. Speech recognition was turn-based; response audio used streaming text-to-speech.

01VOICE INPUTmicrophone capture
02LOCAL SPEECH RECOGNITIONFaster Whisper base on CPU
03REQUEST HANDLINGFlask application routing
04RETRIEVAL & FINANCIAL CONTEXTembeddings, FAISS, SQLite and data access
05LANGUAGE-MODEL REASONINGexplicit external provider route
06RESPONSE CONSTRUCTIONanswer assembly for the voice loop
07SPEECH OUTPUTstreaming OpenAI TTS response
PIPELINE BOUNDARY

Each stage has a defined responsibility. The main ASR flow captures a complete spoken segment before transcription; it does not imply incremental streaming or full-duplex conversation.

My Responsibility

Hands-on implementation across the end-to-end voice, retrieval and application coordination layers.

  • 01ArchitectureDesigned the separation between voice capture, local ASR, retrieval, reasoning and speech response.
  • 02ImplementationImplemented the application flow, Flask coordination and provider-facing request and response handling.
  • 03Voice PipelineIntegrated microphone capture, local Faster Whisper transcription and the spoken response path.
  • 04Retrieval / Data IntegrationImplemented embedding, FAISS, SQLite metadata and financial-data integration paths for contextual responses.
  • 05System IntegrationConnected model reasoning, retrieval and streaming TTS into a working voice interaction prototype.

Critical Decisions

DECISION 01

Local ASR for speech input

WHY Speech recognition was kept close to the application and hardware available in 2024.

TRADE-OFF / EFFECT CPU-local Faster Whisper preserved a clear local boundary while keeping transcription turn-based.

DECISION 02

Retrieval outside the language model

WHY Financial and domain context should be assembled through an explicit retrieval path.

TRADE-OFF / EFFECT Embeddings, FAISS and SQLite made context access a separate system responsibility rather than a memory claim.

DECISION 03

Separate speech pipeline stages

WHY Capture, transcription, retrieval, reasoning and synthesis had different constraints and failure modes.

TRADE-OFF / EFFECT The stages were easier to inspect and replace, but end-to-end latency accumulated across them.

DECISION 04

External reasoning with local-first components

WHY The preserved implementation used an external provider for response generation while other components remained local or application-owned.

TRADE-OFF / EFFECT This was not a fully local system, but provider routing stayed explicit.

DECISION 05

Modular component boundaries

WHY Retrieval, model and speech components were evolving during the historical prototype.

TRADE-OFF / EFFECT Modular boundaries supported experimentation without presenting every branch as one simultaneous production architecture.

Trust / Safety Boundaries

The system connects voice and financial context, but model output remains an interpretation layer rather than authoritative financial state.

PROBABILISTIC AI MAY

Interpret transcribed requests and generate advisory responses from retrieved context.

DETERMINISTIC SOFTWARE OWNS

Audio handling, request routing, retrieval operations, data integration and response pipeline coordination.

HUMAN AUTHORITY

The user remains responsible for interpreting information and making any consequential decision.

OUTSIDE MODEL AUTHORITY

Autonomous trading, capital deployment, brokerage authority and formal financial-advice compliance claims.

Failure / Constraint → Engineering Response

OBSERVED FAILURE / CONSTRAINT

Turn-based transcription

The main ASR path captured and wrote a complete spoken segment before transcription.

ENGINEERING RESPONSE

Bounded voice stage

The historical system kept transcription explicit. A modern rebuild would evaluate VAD and incremental ASR separately rather than rewriting the 2024 claim.

OBSERVED FAILURE / CONSTRAINT

Heterogeneous retrieval experiments

Multiple embedding and vector-store paths existed across the preserved project history.

ENGINEERING RESPONSE

Separate core path from experiments

The public case study distinguishes the evidenced FAISS and SQLite core path from optional or experimental alternatives preserved in the project history.

OBSERVED FAILURE / CONSTRAINT

No formal WER benchmark

Repeated live end-to-end conversations were preserved, but quantified WER results were not collected.

ENGINEERING RESPONSE

Qualify the evidence

The case study describes the implemented ASR path without claiming measured accuracy or high-volume production behavior.

Technology / Versions

Technology at time of build — 2024. The table distinguishes evidenced core implementation from historical context and qualifies versions only where the evidence requires it.

System 02 technology evidence
TechnologyVersion / ModelRoleEvidence basis
Faster Whisper1.0.2Local ASR runtimeEvidenced core
WhisperbasePrimary speech modelEvidenced core
PyAudio0.2.14Microphone and audio I/OEvidenced core
SpeechRecognition3.10.1Speech-input integrationEvidenced core
OpenAI Python1.30.1External provider integrationEvidenced core
OpenAI TTStts-1Streaming speech responseEvidenced core
Groqllama3-70b-8192Response generation routeEvidenced core
Sentence Transformers3.3.1Embedding runtimeEvidenced core
all-MiniLM-L6-v2Model IDSemantic embeddingsEvidenced core
FAISS CPU1.9.0.post1Vector similarity searchEvidenced core
SQLiteExact version not capturedRetrieval metadataVersion qualified
Flask2.3.3Application backendEvidenced core
flask-cors3.0.10Frontend/backend integrationEvidenced core
torch2.5.1Local ML runtimeEvidenced core
transformers4.47.0Transformer toolingEvidenced core

Historical experiments such as nomic-embed-text-v1.5, optional CLIP, Chroma, OpenAI embeddings, ChatOpenAI, ChatOllama and pyttsx3 are kept as architectural context rather than presented as one simultaneous core stack.

Evidence

This public case study preserves the approved architecture, technology history, system boundaries, implementation decisions and historical constraints without linking the legacy source tree.

SANITIZED CASE STUDYPublic architecture abstractionPrivate source details, credentials, paths and sensitive financial integration material remain excluded.

Scope Boundaries

SAFE TO DISCLOSE

End-to-end voice architecture, local ASR role, retrieval architecture, evidenced technologies and versions, provider separation and historical constraints.

KEPT PRIVATE

Credentials, provider keys, private source paths, internal configuration, account details, private financial data and proprietary prompts or investment logic.

NOT CLAIMED / OUT OF SCOPE

Formal WER, fine-tuning, custom model training, streaming ASR, telephony, production-scale concurrency, fully local operation, autonomous trading and air-gapped operation.