A modern, responsive web application for converting text to speech and speech to text using Hugging Face's advanced AI models. *There may be errors due to the models, but this is not a problem, if you keep trying after the error messages you will get results.
git clone https://github.com/yildizahmethakan0/TTS--STT.git
cd AI_TextToSpeech_And_SpeechToText
Create an appsettings.json file in the project root or modify the existing one:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"HuggingFace": {
"APIKey": "YOUR_HUGGINGFACE_API_KEY_HERE"
}
}
dotnet build
dotnet run
Open your browser and navigate to https://localhost:5001 or http://localhost:5000
/wwwroot/audio_outputs directory├── Program.cs # Main application entry point and API endpoints
├── TextToSpeechRequest.cs # Text-to-speech request model
├── wwwroot/ # Static files
│ ├── index.html # Main HTML file
│ ├── style.css # CSS styles
│ ├── script.js # JavaScript functionality
│ └── audio_outputs/ # Generated audio files (created at runtime)
├── appsettings.json # Application settings including API keys
Converts text to speech using the facebook/mms-tts-tur model.
Request Body:
{
"Text": "Your text to convert to speech"
}
Response: Audio file (WAV format)
Converts speech to text using the openai/whisper-large-v3-turbo model.
Request Body: Form data with an audio file (key: "audio")
Response:
{
"Text": "Transcribed text from the audio"
}
You can modify the Hugging Face models used in Program.cs:
For text-to-speech, change the model in the line:
HttpResponseMessage response = await httpClient.PostAsync("models/facebook/mms-tts-tur", stringContent);
For speech-to-text, change the model in the line:
HttpResponseMessage response = await httpClient.PostAsync("models/openai/whisper-large-v3-turbo", byteArrayContent);
A modern, responsive web application for converting text to speech and speech to text using Hugging Face's advanced AI models. *There may be errors due to the models, but this is not a problem, if you keep trying after the error messages you will get results.
git clone https://github.com/yildizahmethakan0/TTS--STT.git
cd AI_TextToSpeech_And_SpeechToText
Create an appsettings.json file in the project root or modify the existing one:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*",
"HuggingFace": {
"APIKey": "YOUR_HUGGINGFACE_API_KEY_HERE"
}
}
dotnet build
dotnet run
Open your browser and navigate to https://localhost:5001 or http://localhost:5000
/wwwroot/audio_outputs directory├── Program.cs # Main application entry point and API endpoints
├── TextToSpeechRequest.cs # Text-to-speech request model
├── wwwroot/ # Static files
│ ├── index.html # Main HTML file
│ ├── style.css # CSS styles
│ ├── script.js # JavaScript functionality
│ └── audio_outputs/ # Generated audio files (created at runtime)
├── appsettings.json # Application settings including API keys
Converts text to speech using the facebook/mms-tts-tur model.
Request Body:
{
"Text": "Your text to convert to speech"
}
Response: Audio file (WAV format)
Converts speech to text using the openai/whisper-large-v3-turbo model.
Request Body: Form data with an audio file (key: "audio")
Response:
{
"Text": "Transcribed text from the audio"
}
You can modify the Hugging Face models used in Program.cs:
For text-to-speech, change the model in the line:
HttpResponseMessage response = await httpClient.PostAsync("models/facebook/mms-tts-tur", stringContent);
For speech-to-text, change the model in the line:
HttpResponseMessage response = await httpClient.PostAsync("models/openai/whisper-large-v3-turbo", byteArrayContent);