This demo utilizes Azure OpenAI and Azure AI Foundry Text-To-Speech (TTS) service. It acts as a language tutor that assists users to study new languages.
- User needs to configure the Azure OpenAI (OpenAI Key, deployment, OpenAI Account) and Speech Service (SpeechKey, region)
- The program takes input from the user.
- The input is sent to the Azure OpenAI model.
- The response is then returned as text.
- The text is sent to TTS Service and a voice is being played.
- A deployment and endpoint on Azure OpenAI. See Azure OpenAI in Foundry Models.
- A subscription key for the Speech service. See Try the speech service for free.
- A PC with a working speaker or headset. See the Speech SDK installation quickstart for details on system requirements and setup.
- Edit the
Program.cs
source:- Replace the string
OpenAIKey
andOpenAIAccount
with your own AzureOpenAI key and account. - Replace the string
DeploymentName
. You can find this deployment name in Playgrounds - Chat - Deployment. - Replace the string
SpeechKey
andRegion
. You can find them on Azure AI Foundry - Overview.SpeechKey
is API Key.
- Replace the string
To debug the app and then run it, press F5 or use Debug > Start Debugging. To run the app without debugging, press Ctrl+F5 or use Debug > Start Without Debugging.
Run the following command from the directory that contains this sample:
dotnet LanguageTutor/bin/Debug/net8.0/LanguageTutor.dll