Cogniezer-Backend is the backbone of the Cogniezer project, aimed at providing real-time audio summarization services. Developed as part of the BSc Hons Computer Science program at the University of Kelaniya, this REST API leverages the power of FastAPI, Azure Speech-to-Text, and the T5-base transformer model. Our system is trained on a diverse range of datasets, ensuring robust and accurate summarization.
- Audio to text summarization
- Integration with Azure Speech-to-Text
- Built using FastAPI for high performance
- Utilizes T5-base transformer model for summarization
- Trained on diverse datasets for robust performance
- Python 3.7 or higher
- Conda
- Git
git clone https://github.com/InsiderCloud/Cogniezer-Backend
conda create -n cogniezer python=3.7
conda activate cogniezer
pip install -r requirements.txt
Update the configuration files with your settings:
.
├── config
│ ├── config.yaml
├── params.yaml
.
Add the following environment variables to the .env
file:
AZURE_KEY=your_azure_key
AZURE_REGION=your_azure_region
HOST=localhost
PORT=8000
gunicorn app:app
Modify the IMAGE_NAME
and IMAGE_TAG
in the build.sh
file and run:
./build.sh
GET /
Returns the main page.
http://{host}:{port}/
POST /api/predict
Predicts the summary of the provided text.
curl -X POST http://{host}:{port}/api/predict \
-H 'Content-Type: application/json' \
-d '{"text": "Text to be summarized"}'
POST /api/uploadfile/
Uploads an audio file, transcribes it, and returns the summary.
curl -X POST http://{host}:{port}/api/uploadfile/ \
-H 'Content-Type: multipart/form-data' \
-F 'wav_file=@path_to_your_audio_file.wav'
We welcome contributions from the community! Please follow these steps to contribute:
- Fork the repository
- Create a new branch for your feature or bugfix
- Commit your changes
- Push the branch to your fork
- Open a pull request
This project is licensed under the MIT License. See the LICENSE file for details.