๐ ๐ก Talabat Hackathon project that translates and generates audio (voice) of menu items in the Talabat app into many languages using AWS Polly.
This C# project is a web REST API designed to enhance the Talabat app by:
- Real-Time Translations: Translate menu/catalog descriptions into multiple languages using AWS Translate.
- Text-to-Speech: Generate audio for menu items using AWS Polly.
- Translates menu items dynamically into the language of the user's choice.
- Provides an audio version of menu items for accessibility.
- Seamlessly integrates into the Talabat app ecosystem.
- Language: C#
- Framework: ASP.NET Core
- Cloud Services:
AmazonTranslateClientfor translations.AmazonPollyClientfor text-to-speech functionality.
-
Clone the repository:
git clone https://github.com/guibranco/talabat-hackathon-2022.git cd talabat-hackathon-2022 -
Install dependencies and build the project:
dotnet restore dotnet build
-
Configure AWS credentials:
- Use the AWS CLI to set up your credentials.
- Alternatively, set environment variables for AWS access key and secret.
-
Run the application:
dotnet run
-
Access the API at
http://localhost:<port>.
- GET
api/v{version:apiVersion}/audio/{path}
Retrieve a generated audio file by specifying the file path.
- GET
api/v{version:apiVersion}/settings
Retrieve the current settings, including available languages with theirTranslateIsoCodesandTranslateIsoPairs.
- POST
api/v{version:apiVersion}/speech
Generate an audio file of the input text in the selected language.- Body:
{ "text": "Sample text to convert to speech", "language": "en" } - Response: A URL or file stream of the generated audio.
- Body:
- POST
api/v{version:apiVersion}/translate
Translate the input text from one language to another.- Body:
{ "text": "Sample text to translate", "sourceLanguage": "en", "targetLanguage": "es" } - Response: The translated text in the target language.
- Body:
Contributions are welcome! Please submit issues or pull requests via the GitHub repository.
This project is licensed under the MIT License. See the LICENSE file for details.