Fix Python Backend Errors and Make Fully Functional AI Backend (TTS/STT)

Job ID: 39797315

Budget: ₹5,000 – ₹8,500 INR

I have a Python/Flask backend for an AI app with the following structure:

backend/
├─ main.py
├─ chat.py
├─ stt/ # speech-to-text folder (class-based)
├─ tts/ # text-to-speech folder (class-based)
├─ memory.py
├─ weather.py
├─ search.py
├─ test_backend.py
└─ .env

Currently, I am encountering multiple issues:
1. STT: Import errors because stt is a folder/package, not a .py file.
2. TTS: Import errors; backend uses a class-based TTS system (BaseTTS) without a standalone function.
3. Memory: save_memory / load_memory functions don’t exist; likely uses a class.
4. Weather: API key not configured.
5. Search: Syntax error in code (unclosed parenthesis).

Tasks/Deliverables

1. Fix all import and module errors for STT, TTS, and memory modules.
2. Make test_backend.py fully functional:
3. Test chat.py, STT, TTS, memory, weather, search and other modules.
4. Make sure .env exists. If API keys are sensitive, dummy keys can be used for testing.
5. Correctly instantiate and call class-based TTS and STT methods.
6. Fix syntax errors in search.py.
7. Ensure all modules run successfully when test_backend.py is executed.

Once all fixes are applied:
1. test_backend.py runs without errors.
2. STT converts audio → text.
3. TTS converts text → audio.
4. Chat, memory, weather, email, vision, search etc modules work correctly.

Deliverables must include fully working backend and the detailed change log. For each module, the freelancer should specify:
1. What the error was.
2. How it was fixed.
3. Any new files, classes, or methods added.
4. Any changes to configuration or .env files.
5. Verification steps or example output.

Requirements
1. Strong Python 3 experience.
2. Familiarity with Flask and package-based Python projects.
3. Experience with AI TTS/STT implementations is a plus.
4. Able to work with .env configuration files.

Will hire by 18th September. Selected freelancers should be able to complete the project within 1-2 days