https://github.com/guibranco/talabat-hackathon-2022
:runner: :bulb: Talabat Hackathon 2022 API project
https://github.com/guibranco/talabat-hackathon-2022
amazon-text-to-speech amazon-web-services api aws aws-polly hackathon polly service speech-to-text speech-to-txt talabat text-to-speech txt-to-speech
Last synced: about 2 months ago
JSON representation
:runner: :bulb: Talabat Hackathon 2022 API project
- Host: GitHub
- URL: https://github.com/guibranco/talabat-hackathon-2022
- Owner: guibranco
- License: mit
- Created: 2022-07-05T10:34:02.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-04-08T12:53:26.000Z (about 1 year ago)
- Last Synced: 2024-04-08T13:47:56.094Z (about 1 year ago)
- Topics: amazon-text-to-speech, amazon-web-services, api, aws, aws-polly, hackathon, polly, service, speech-to-text, speech-to-txt, talabat, text-to-speech, txt-to-speech
- Language: C#
- Homepage: https://guibranco.github.io/talabat-hackathon-2022/
- Size: 1010 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Talabat Hackathon 2022
🏃 💡 Talabat Hackathon project that translates and generates audio (voice) of menu items in the [Talabat](https://talabat.com) app into many languages using AWS Polly.
[](https://github.com/guibranco/talabat-hackathon-2022)
[](https://wakatime.com/badge/github/guibranco/talabat-hackathon-2022)
[](https://github.com/guibranco/talabat-hackathon-2022/actions/workflows/build.yml)
[](https://github.com/guibranco/talabat-hackathon-2022/actions/workflows/sonar-cloud.yml)
[](https://github.com/guibranco/talabat-hackathon-2022)## Code Quality
[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022) [](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)
[](https://sonarcloud.io/summary/new_code?id=guibranco_talabat-hackathon-2022)
[](https://www.codefactor.io/repository/github/ApiBR/vagas-aggregator-ui)[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)
[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)
[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)
[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)
[](https://sonarcloud.io/dashboard?id=guibranco_talabat-hackathon-2022)[](https://codeclimate.com/github/guibranco/talabat-hackathon-2022/maintainability)
[](https://codeclimate.com/github/guibranco/talabat-hackathon-2022/test_coverage)---
## About the Project
This **C# project** is a **web REST API** designed to enhance the Talabat app by:
1. **Real-Time Translations**: Translate menu/catalog descriptions into multiple languages using [AWS Translate](https://aws.amazon.com/translate/).
2. **Text-to-Speech**: Generate audio for menu items using [AWS Polly](https://aws.amazon.com/polly/).### Features
- 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.---
## Tech Stack
- **Language**: C#
- **Framework**: ASP.NET Core
- **Cloud Services**:
- `AmazonTranslateClient` for translations.
- `AmazonPollyClient` for text-to-speech functionality.---
## Installation and Usage
1. Clone the repository:
```bash
git clone https://github.com/guibranco/talabat-hackathon-2022.git
cd talabat-hackathon-2022
```2. Install dependencies and build the project:
```bash
dotnet restore
dotnet build
```3. Configure AWS credentials:
- Use the AWS CLI to set up your credentials.
- Alternatively, set environment variables for AWS access key and secret.4. Run the application:
```bash
dotnet run
```5. Access the API at `http://localhost:`.
---
## API Endpoints
### Available Routes
#### Audio Retrieval
- **GET** `api/v{version:apiVersion}/audio/{path}`
Retrieve a generated audio file by specifying the file path.#### Settings Retrieval
- **GET** `api/v{version:apiVersion}/settings`
Retrieve the current settings, including available languages with their `TranslateIsoCodes` and `TranslateIsoPairs`.#### Text-to-Speech
- **POST** `api/v{version:apiVersion}/speech`
Generate an audio file of the input text in the selected language.
- **Body**:
```json
{
"text": "Sample text to convert to speech",
"language": "en"
}
```
- **Response**: A URL or file stream of the generated audio.#### Translation
- **POST** `api/v{version:apiVersion}/translate`
Translate the input text from one language to another.
- **Body**:
```json
{
"text": "Sample text to translate",
"sourceLanguage": "en",
"targetLanguage": "es"
}
```
- **Response**: The translated text in the target language.---
## Contributing
Contributions are welcome! Please submit issues or pull requests via the [GitHub repository](https://github.com/guibranco/talabat-hackathon-2022).
---
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.