{"id":21870701,"url":"https://github.com/mbta/watts","last_synced_at":"2026-05-19T03:46:07.011Z","repository":{"id":227701034,"uuid":"767107954","full_name":"mbta/watts","owner":"mbta","description":null,"archived":false,"fork":false,"pushed_at":"2025-03-04T18:57:57.000Z","size":94,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-03-04T19:37:53.719Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mbta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-04T18:05:17.000Z","updated_at":"2025-03-04T18:57:59.000Z","dependencies_parsed_at":"2024-04-02T17:55:02.229Z","dependency_job_id":"6e64aea1-f122-447f-aebf-6aab0bf8cf99","html_url":"https://github.com/mbta/watts","commit_stats":null,"previous_names":["mbta/watts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbta%2Fwatts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbta%2Fwatts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbta%2Fwatts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mbta%2Fwatts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mbta","download_url":"https://codeload.github.com/mbta/watts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244875916,"owners_count":20524751,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-28T06:12:21.750Z","updated_at":"2026-05-19T03:46:06.986Z","avatar_url":"https://github.com/mbta.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Watts\n\nMBTA text-to-speech service\n\n## Prerequisites\n\n* [asdf](https://asdf-vm.com/)\n* [direnv](https://direnv.net/)\n\n## Development\n\n* Run `asdf install` from the repository root.\n* `mix deps.get` to fetch dependencies.\n* Copy `.envrc.template` to `.envrc`, then edit `.envrc` and make sure all\n  required environment variables are set. When finished, run `direnv allow` to\n  activate them.\n* To start the server, run `iex -S mix`.\n\n**Note:** There is no automatic code reloading in development. To pick up code\nchanges while the server is running, use the `recompile` command in IEx.\n\n## API\n\nThe main API endpoint is `/tts`, which accepts JSON POST requests with the\nfollowing parameters:\n* `text` - The text to generate, in SSML format. Required.\n* `voice_id` - The id of the Polly voice to use. Required.\n* `output_format` - The format to return. Defaults to `mp3`\n\nAn `x-api-key` HTTP header must also be set to the value specified in the\n`WATTS_API_KEY` environment variable.\n\nExample request, using `curl` and a local development instance of the app:\n\n    curl localhost:4005/tts \\\n      --output voice.mp3 \\\n      --header \"x-api-key: your_api_key_here\" \\\n      --json '{\"voice_id\": \"Matthew\", \"text\": \"\u003cspeak\u003eYour text here.\u003c/speak\u003e\"}'\n\nNote to synthesize new (uncached) voice lines, the `WATTS_ENABLE_POLLY`\nenvironment variable must be `true`. **This incurs a cost per character of\ntext**, so avoid large amounts of text or a large number of unique lines.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbta%2Fwatts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmbta%2Fwatts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmbta%2Fwatts/lists"}