Blog
All Blog Posts | Next Post | Previous Post
Voice-Controlled Maps in Delphi with TMS AI Studio + OpenAI TTS/STT
Monday, August 11, 2025
The world of Delphi development just took another leap into the future. With the latest enhancements to TMS AI Studio, we now have full integration of OpenAIs Text-to-Speech (TTS) and Speech-to-Text (STT) capabilities.
What does this mean? It means your Delphi apps can now listen and talk and even respond with intelligent, real-time actions.
And the first mind-blowing demo?
Voice-controlled route navigation on an interactive map.
From Your Voice → MP3 → OpenAI → Intelligent Action
At the core of this demo lies a simple but powerful idea:
You speak your command e.g., Show me the route from Brussels to Paris and your Delphi app figures out exactly what you mean and acts on it.
The process works like this:
-
Record from microphone
Using the open-source TMS AudioRecorder Library, we capture the voice via the microphone and return it as an MP3 stream. This is done entirely from Delphi code with just a few lines: -
Send MP3 to OpenAI for transcription (STT)
The MP3 is sent to OpenAIs STT API, which returns the transcribed text. -
Pass text as a command to OpenAI (with Function Calling)
The transcribed text is sent to OpenAIs Chat API, where function calling is used to trigger a Delphi function that plots a route on a map. -
Show route with OpenRoute + OpenLayers
The function retrieves directions from OpenRoute and displays them on an interactive OpenLayers map component all within your Delphi application using the TTMSFNCMaps component from TMS FNC Maps
Everything brought together in a VCL demo project, this looks like:

You can download the full source code of this demo here. To run this compile & run this example on your machine, make sure to install the latest version of TMS AI Studio and TMS FNC Maps.
Function Calling: The AI Knows What to Do
This isnt just send text and get text back.
Were using OpenAI Function Calling so that when the AI detects a route command, it automatically calls the ShowRoute function that was setup via:
This means you dont need to manually parse text or guess what the user meant the AI does the intent recognition and calls your Delphi function directly. Here is gets the parameters that were configured. In addition to use the OpenRoute directions API to calculate the route, it also uses OpenAI TTS to speak the route calculation it will perform:
The code to show the directions is done by using the TTMSFNCDirections component to request directions and then via an anonymouse method call, the resulting route is returned and displayed as a polyline and a start and end marker on the map:
Why This Is a Game-Changer for Delphi Developers
With this TTS/STT integration, Delphi apps can now be fully voice-controlled.
And because were working in TMS AI Studio, the possibilities are endless:
-
Hands-free map navigation
-
Voice-activated data queries
-
Real-time spoken feedback to the user
-
Natural conversation between user and app
And all of this runs natively in Delphi VCL or FMX applications. See everything in action in this video:
A Glimpse of the Future
This voice to route demo is just the start. Imagine:
-
A Delphi CRM app where you say Show all customers from Belgium who ordered last month and the grid updates instantly.
-
A Delphi medical app where doctors dictate notes and instantly trigger patient record updates.
-
A Delphi IoT control panel where you say Turn on greenhouse lights until 8pm and it just happens.
With TMS AI Studio + OpenAI + Delphi, were now in an era where your apps can understand and speak the users language literally.
💡 Stay tuned even more mind-blowing AI integrations are coming to TMS AI Studio soon.
Weve only scratched the surface of whats possible when Delphi meets world-class AI.
Bruno Fierens

This blog post has not received any comments yet.
All Blog Posts | Next Post | Previous Post