A bot for Microsoft Teams that provides real-time translation and text-to-speech capabilities.
- Translate messages between languages (English, Spanish, Russian)
- Convert text to speech using Windows TTS voices
- Bot commands for easy interaction
- Simple API for external integrations
- Python 3.9+ installed
- Microsoft Azure account for Bot Registration
- Microsoft Teams account with permissions to add custom apps
pip install -r requirements.txt- Go to the Azure Portal
- Create a new "Bot Channels Registration" resource
- Fill in the required details:
- Name: TeamsInterpreterBot
- Messaging endpoint: The public URL where your bot will be hosted (we'll use ngrok for testing)
- Create a Microsoft App ID and password
- Save the App ID and password
- Open the
.envfile in the project root - Add your Microsoft App ID and password:
MICROSOFT_APP_ID=your-app-id MICROSOFT_APP_PASSWORD=your-app-password
python translation_tts_server.pyThis starts the translation and TTS service on port 8080.
To expose your local bot to Microsoft Teams, you can use ngrok:
ngrok http 3978This will create a public URL like https://abc123.ngrok.io that forwards to your local server.
- Go back to your Bot registration in Azure
- Update the Messaging endpoint with your ngrok URL +
/api/messages(e.g.,https://abc123.ngrok.io/api/messages)
- Open
static/manifest.json - Replace
YOUR_BOT_ID_HEREwith your Microsoft App ID - Update
validDomainsto include your ngrok domain
python app.pyThis starts the bot server on port 3978.
- Create a zip file containing:
manifest.json(from the static folder)color.pngandoutline.pngicons (you can use placeholder images for testing)
- In Microsoft Teams, go to "Apps" > "Manage your apps" > "Upload a custom app"
- Upload the zip file
/help- Show help information/languages- Show supported languages/translate <text>- Translate text to another language/speak <text>- Convert text to speech/call <meeting-link>- Join a meeting (Coming soon)
The system consists of three main components:
- Translation and TTS Server - A Python HTTP server that handles translation and text-to-speech requests.
- Teams Bot - A Bot Framework application that integrates with Microsoft Teams for messaging.
- Calling Handler - Manages real-time media sessions for meeting interpretation.
The bot now supports joining Teams meetings to provide real-time interpretation. This requires:
- The calling webhook configured in your bot registration
- Additional Graph API permissions for calling
- Proper Teams manifest settings with
supportsCallingandsupportsVideoenabled
For full calling functionality, you'll need to:
- Configure your Bot Channel Registration with call capabilities
- Add
calls.accessMedia.allandcalls.joinGroupCalls.allpermissions to your app registration - Make sure your web server has the necessary endpoints to handle call events
-
Start the translation server:
python translation_tts_server.py -
In a separate terminal, start the bot server:
python app.py -
Use ngrok to create a public URL:
ngrok http 3978
- If the bot doesn't respond, check that your App ID and password are correct in the
.envfile. - If translations are not working, ensure the translation server is running on port 8080.
- For TTS issues, ensure your Windows system has speech voices installed.
Created by Your Name / Your Company.