Text chat is table stakes
AI4Delphi Vision&Voice

Real line-of-business workflows are multimodal: read a scanned invoice, transcribe a support call, narrate a result, generate a marketing image. Delphi has had none of it natively; .NET has all of it. Vision&Voice brings the lot across, and adds the local, offline story on top.

Free Trial Pricing

 Latest: 1.0.0.0 - What's New

MultimodalDemo.dpr
uses
  CNCoreClr.AI.Multimodal;

// Vision: understand an image
Vision := TVisionClient.Create(Key, 'gpt-4o-mini');
Answer := Vision.Describe('invoice.png', 'Extract the total and due date.');

// Speech-to-text and text-to-speech
Speech := TSpeechClient.Create(Key);
Text   := Speech.Transcribe('call.mp3', '');
Speech.Synthesize('Your order has shipped.', 'reply.mp3', '', '');

// Image generation
Img := TImageClient.Create(Key, 'gpt-image-1');
Img.Generate('a teal product banner, flat design', 'banner.png');

Part A — Multimodal

Three Delphi-friendly clients over the OpenAI HTTP API, deliberately dependency-light: primitives in, strings out or written to a file path you supply.

  • TVisionClient.Describe(imagePath, prompt) — image question-answering and structured extraction. This is the "read this scanned document" workhorse.
  • TSpeechClient.Transcribe(audioPath, model) — speech to text via Whisper.
  • TSpeechClient.Synthesize(text, outputPath, model, voice) — text to speech, written straight to a file.
  • TImageClient.Generate(prompt, outputPath) — image generation, handling both base64 and URL responses.
  • Endpoint override for gateways, Azure and OpenAI-compatible servers.

Part B — Local LLMs, offline and free per call

The useful realisation is that the chat pack already runs local models. Ollama and Foundry Local expose an OpenAI-compatible API, so pointing Connect's chat client at the local server needs no new code and keeps the full resilience and telemetry pipeline:

LocalChat.dpr
// Local Llama via Ollama (http://localhost:11434), OpenAI-compatible:
Client := TChatClient.Create('openai', 'ollama', 'llama3.1');
Client.Endpoint := 'http://localhost:11434/v1';
Writeln(Client.Complete('You are concise.', 'Explain Delphi in one sentence.'));

On the roadmap

  • Azure OpenAI auth (api-key and deployment routing) and Anthropic vision.
  • Streaming transcription, word timestamps and translations.
  • Offline PDF and document text extraction, pairing naturally with vision for "read this document".
  • Image edits, variations and inpainting.
  • A thin TLocalChat convenience wrapper, and in-process local inference via ONNX Runtime GenAI (Phi, Llama) for a no-server option.

Deployment notes

  • Audio and image generation produce files: the facade writes to a path your Delphi code supplies, which is the cleanest thing to pass across the bridge.
  • Local inference via Ollama needs that server installed and running; the planned in-process ONNX GenAI route is x64-only, the same constraint as AI4Delphi Predict.
  • Vision and audio calls carry larger payloads — worth watching with Connect's cost and latency telemetry.
  • Requires Core: .Net 8+ or Framework: .NET Framework 4.5 or later, and a dotNetCore4Delphi licence (Core edition) or a .Net Runtime Library for Delphi licence (Framework edition).