Skip to content

guibranco/talabat-hackathon-2022

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

522 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Talabat Hackathon 2022

๐Ÿƒ ๐Ÿ’ก Talabat Hackathon project that translates and generates audio (voice) of menu items in the Talabat app into many languages using AWS Polly.

GitHub license wakatime Build Sonar Cloud Analysis GitHub last commit

Code Quality

Quality Gate Status Code Smells

Coverage CodeFactor

Lines of Code Maintainability Rating

Technical Debt Duplicated Lines (%)

Reliability Rating Security Rating

Bugs Vulnerabilities

Maintainability 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.
  2. Text-to-Speech: Generate audio for menu items using AWS 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:

    git clone https://github.com/guibranco/talabat-hackathon-2022.git
    cd talabat-hackathon-2022
  2. Install dependencies and build the project:

    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:

    dotnet run
  5. Access the API at http://localhost:<port>.


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:
      {
        "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:
      {
        "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.


License

This project is licensed under the MIT License. See the LICENSE file for details.

โšก