Delphi Real-Time Translator AI

Опубликовано: 02 Июнь 2023
на канале: eSeGeCe
803
like

Hello and Welcome to a new eSeGeCe e-learning session. Today we will show how to create a Real-Time Translation Application in Delphi using the OpenAI API and how to convert the response to Voice.

First we create a new form with 2 buttons and 1 memo. Then we drop a Translator component which encapsulates the Translation API which will be used to interactuate with OpenAI. The Translator requires to set the OpenAI Api Key, which can be obtained from the OpenAI Servers. We drop 3 additional components, an Audio Recorder component that it's used to capture the microphone audio and create a wave file which will be sent to OpenAI; an Amazon Text To Speech component that converts text to audio and finally and audio player to play the mp3 file returned by Amazon Polly API.

Then, we handle the Translator events to know when the audio is recording and when is stopped. OnTranslation event returns the text translated when using our own voice in another language different from English.

Now, we compile the application and we show a simple example where we say "Hola, Buenos días, como estás?" in spanish and we get the translation in English.


Смотрите видео Delphi Real-Time Translator AI онлайн без регистрации, длительностью часов минут секунд в хорошем качестве. Это видео добавил пользователь eSeGeCe 02 Июнь 2023, не забудьте поделиться им ссылкой с друзьями и знакомыми, на нашем сайте его посмотрели 803 раз и оно понравилось like людям.