A modern web application that allows users to create and upload text-to-speech announcements to Webex calling services. This tool integrates with ElevenLabs for text-to-speech conversion and can be used for various services such as auto attendant, music on hold, or call queue announcements.
Before you begin, ensure you have:
spark-admin:telephony_config_write
spark-admin:locations_read
git clone https://github.com/sieteunoseis/webex-audio-tts.git
npm run install-all
.env
file in the frontend directory and add your Webex credentials:VITE_WEBEX_CLIENT_ID=your-client-id VITE_WEBEX_REDIRECT_URI=http://localhost:5173/oauth VITE_WEBEX_SCOPE=spark-admin:telephony_config_write spark-admin:locations_read
.env
file in the backend directory and add the following:ELEVENLABS_API_KEY=elevenlabs-api-key WEBEX_CLIENT_ID=webex-client-id WEBEX_REDIRECT_URI=http://localhost:5173/oauth WEBEX_CLIENT_SECRET=webex-client-secret WEBEX_ORG_ID=webex-org-id SAVE_WAV_FILES=true
Note: Development mode uses port 5173 for the frontend. In production, the application will run on port 3000 or whatever port you specify in the docker-compose file.
npm run dev
The application will be available at http://localhost:5173
wget -O docker-compose.yaml https://raw.githubusercontent.com/sieteunoseis/webex-audio-tts/refs/heads/main/docker-compose.yaml
touch frontend.env
Variable Name | Explanation | Example | Required |
---|---|---|---|
VITE_WEBEX_CLIENT_ID | Client ID from your Webex Developer account | Yes | |
VITE_WEBEX_REDIRECT_URI | OAuth callback URL for authentication | http://localhost:3000/oauth | Yes |
VITE_WEBEX_SCOPE | Space-separated list of required API permissions | spark-admin:telephony_config_write spark-admin:locations_read | Yes |
VITE_BRANDING_NAME | Organization name for branding purposes in NavBar | Automate Builders |
no |
VITE_BRANDING_URL | URL for organization branding/website in NavBar | http://automate.builders |
no |
touch backend.env
Variable Name | Explanation | Example | Required |
---|---|---|---|
ELEVENLABS_API_KEY | API key for ElevenLabs text-to-speech service | Yes | |
WEBEX_CLIENT_ID | Client ID from your Webex Developer account | Yes | |
WEBEX_CLIENT_SECRET | Client Secret from your Webex Developer account | Yes | |
WEBEX_REDIRECT_URI | OAuth callback URL for authentication | http://localhost:3000/oauth | Yes |
WEBEX_ORG_ID | Your Webex Organization ID | Yes | |
SAVE_WAV_FILES | Toggle to save generated audio files locally | true | No |
docker-compose up -d
http://localhost:3000
# Create directories if they don't exist
mkdir -p ./data
# Set permissions (replace 1000:1000 with your actual UID:GID if different)
chown -R 1000:1000 ./data
chmod 755 ./data
Add the following line to the docker-compose.yml file for the backend service.
user: "${UID:-1000}:${GID:-1000}"
volumes:
- ./data:/usr/src/app/data
Note: that the data directory will be used to store the audio files and the db directory will be used to store the sqlite database.
http://localhost:5173/oauth
or your production URLspark-admin:telephony_config_write
spark-admin:locations_read
frontend.env
and backend.env
file(s)webex-audio-tts
├─ README.md
├─ backend
│ ├─ .dockerignore
│ ├─ Dockerfile
│ ├─ data
│ ├─ package-lock.json
│ ├─ package.json
│ └─ server.js
├─ docker-compose.yaml
├─ frontend
│ ├─ .dockerignore
│ ├─ Dockerfile
│ ├─ README.md
│ ├─ components.json
│ ├─ config.js
│ ├─ eslint.config.js
│ ├─ generate-config.sh
│ ├─ index.html
│ ├─ nginx.conf
│ ├─ package-lock.json
│ ├─ package.json
│ ├─ postcss.config.js
│ ├─ public
│ │ └─ favicon.ico
│ ├─ src
│ │ ├─ App.jsx
│ │ ├─ components
│ │ │ ├─ BackgroundLogo.jsx
│ │ │ ├─ NavBar.jsx
│ │ │ ├─ WebexTTSForm.jsx
│ │ │ ├─ mode-toggle.tsx
│ │ │ ├─ theme-context.tsx
│ │ │ ├─ theme-provider.tsx
│ │ │ └─ ui
│ │ │ ├─ button.tsx
│ │ │ ├─ card.tsx
│ │ │ ├─ dialog.tsx
│ │ │ ├─ dropdown-menu.tsx
│ │ │ ├─ input.tsx
│ │ │ ├─ navigation-menu.tsx
│ │ │ ├─ select.tsx
│ │ │ ├─ textarea.tsx
│ │ │ ├─ toast.tsx
│ │ │ └─ toaster.tsx
│ │ ├─ config
│ │ │ └─ ConfigContext.jsx
│ │ ├─ hooks
│ │ │ └─ use-toast.ts
│ │ ├─ index.css
│ │ ├─ lib
│ │ │ ├─ select-styles.js
│ │ │ └─ utils.ts
│ │ ├─ main.jsx
│ │ ├─ pages
│ │ │ ├─ Error.jsx
│ │ │ └─ Home.jsx
│ │ └─ vite-env.d.ts
│ ├─ tailwind.config.cjs
│ ├─ tsconfig.app.json
│ ├─ tsconfig.json
│ ├─ tsconfig.node.json
│ └─ vite.config.ts
├─ package-lock.json
├─ package.json
├─ screenshots
│ ├─ app_home_logged_in.png
│ ├─ app_home_login.png
│ ├─ webex_calling_announcements.png
│ ├─ webex_calling_features.png
│ └─ webex_developer_app.png
└─ scripts
└─ git-template-remote.sh
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)This project is licensed under the MIT License - see the LICENSE file for details.
Found on Control Hub > Calling > Features > Announcements > Manage
Frontend container is not able to reach backend container.
Try pinging from frontend to backend container:
docker exec webex-tts-frontend ping webex-tts-backend
Backend container is not able to save the audio files.
docker exec webex-tts-backend ls -l /usr/src/app/data
Try to create a file in the data directory and check the permissions.
docker exec webex-tts-backend touch /usr/src/app/data/test.txt
If you would like to support my work and the time I put in creating the code, you can click the image below to get me a coffee. I would really appreciate it (but is not required).
Owner
Contributors
Categories
Products
WebexProgramming Languages
TypeScriptLicense
Code Exchange Community
Get help, share code, and collaborate with other developers in the Code Exchange community.View Community