Automated free speech to SQL transcription

Master Thesis
Author
Toliopoulou, Christina Anna
Τολιοπούλου, Χριστίνα Άννα
Date
2025-09View/ Open
Keywords
Artificial Intelligence ; Speech-to-sql ; Large language models ; Evaluation of existing models ; Natural language processing ; Database query automation ; Voice-to-textAbstract
Speech-to-SQL is an innovative approach designed to bridge the gap between nontechnical
users and technical ones in terms of database querying. Τhe project
presents an end-to-end application that transforms natural language commands into SQL
queries, with the ability to export the results into flat files for further business analysis.
To evaluate the effectiveness of this approach, multiple open-source commercial Large
Language Models (LLMs), as well as models hosted locally (Hugging Face), were evaluated
and compared. The goal was to identify the most suitable model for the given use
case, and at the same time create a user friendly web application to record or upload these
commands and receive the output. While no single model consistently outperformed the
others across all scenarios, the findings revealed that performance was strongly influenced
by the complexity of the query and the different way of writing the same query. OpenAI,
Gemini, and Claude emerged as the top-performing models in terms of query prediction
accuracy, while their latency measurements were found to be relatively similar. We
concluded that additional steps are required before delivering a concise and productionready
application. These include implementing connections to multiple database types
and performing model optimization to reduce operational costs.


