{"id":50607072,"url":"https://github.com/arach/ora","last_synced_at":"2026-06-06T00:03:27.837Z","repository":{"id":346385174,"uuid":"1184692023","full_name":"arach/ora","owner":"arach","description":null,"archived":false,"fork":false,"pushed_at":"2026-03-23T19:23:20.000Z","size":1558,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-24T13:31:24.374Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/arach.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-03-17T20:52:09.000Z","updated_at":"2026-03-23T19:23:25.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/arach/ora","commit_stats":null,"previous_names":["arach/ora"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/arach/ora","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fora","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fora/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fora/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fora/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arach","download_url":"https://codeload.github.com/arach/ora/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arach%2Fora/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33964367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-05T02:00:06.157Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-06T00:03:27.166Z","updated_at":"2026-06-06T00:03:27.829Z","avatar_url":"https://github.com/arach.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ora\n\n`Ora` is a TypeScript-first text-to-speech runtime for provider integration, voice discovery, and synthesis execution.\n\nRepository: [github.com/arach/ora](https://github.com/arach/ora)\n\nThe package is intentionally small:\n\n- provider registration and request normalization\n- credential injection and runtime lifecycle instrumentation\n- stable voice discovery\n- buffered and streaming synthesis\n- optional playback utilities for apps that need stateful tracking\n\n## Why this exists\n\nTTS providers and model hosts differ in API shape, authentication, and voice catalogs.\n`Ora` gives you one integration surface so your app can:\n\n- discover voices per provider\n- synthesize speech through a stable request/response contract\n- keep provider details and credentials out of host app business logic\n\n## Install\n\n```bash\nbun add @arach/ora\n```\n\n`@arach/ora` also installs cleanly with `pnpm add @arach/ora` and\n`npm install @arach/ora`.\n\nThe published package ships with:\n\n- ESM and CommonJS entrypoints\n- bundled TypeScript declarations for both module systems\n- the `ora-worker` CLI for local or remote worker processes\n\n## Basic setup\n\n```ts\nimport {\n  OraBufferedInstrumentationSink,\n  OraMemoryCacheStore,\n  OraMemoryCredentialStore,\n  createOraRuntime,\n  createOpenAiTtsProvider,\n} from \"@arach/ora\";\n\nconst runtime = createOraRuntime({\n  providers: [createOpenAiTtsProvider()],\n  cacheStore: new OraMemoryCacheStore(),\n  credentialStore: new OraMemoryCredentialStore(),\n  instrumentation: [new OraBufferedInstrumentationSink()],\n});\n\nconst openai = runtime.provider(\"openai\");\n\nopenai.setCredentials({\n  apiKey: process.env.OPENAI_API_KEY ?? \"\",\n});\n\nconst voices = await openai.listVoices();\nconst response = await openai.synthesize({\n  text: \"Hello from Ora.\",\n  voice: voices[0]?.id ?? \"alloy\",\n  format: \"mp3\",\n});\n\nconst providers = await runtime.listProviderSummaries();\nconst catalog = await runtime.catalog();\nconst cachedEntries = await runtime.queryCache({ provider: \"openai\" });\n```\n\n`response` is normalized into a consistent schema regardless of backend:\n`response.audio` carries the real asset reference for playback: inline bytes, a URL, or both.\n\n## Streaming\n\n```ts\nfor await (const event of openai.stream({\n  text: \"Streaming is optional.\",\n  format: \"wav\",\n  preferences: {\n    priority: \"responsiveness\",\n  },\n})) {\n  console.log(event.type, event.timeMs);\n}\n```\n\nThe `stream` API is shared across providers that support it.\n\n## Remote worker\n\nIf you want to keep inference on another machine (for example a Mac mini), run a worker and connect it through `createRemoteTtsProvider(...)`.\n\nAfter installing the package, run the worker with your package manager's exec command:\n\n```bash\nbunx ora-worker init --host 0.0.0.0 --port 4020 --token dev-secret\nbunx ora-worker serve --config .ora-worker/config.json\n```\n\nWorker endpoints:\n\n- `GET /health`\n- `GET /v1/providers`\n- `GET /v1/providers/:provider`\n- `GET /v1/providers/:provider/voices`\n- `GET /v1/catalog`\n- `GET /v1/voices`\n- `GET /v1/cache`\n- `GET /v1/cache/:cacheKey`\n- `DELETE /v1/cache/:cacheKey`\n- `POST /v1/audio/speech`\n- `POST /v1/audio/speech/stream`\n\n## Advanced playback APIs\n\nThe following are optional if your app needs live synchronization:\n\n- `OraPlaybackTracker`\n- `OraDocumentSession`\n- `OraPlaybackOrchestrator`\n\nThese remain available for UI-driven reading or highlighting flows without being part of the core usage narrative.\n\n## Examples\n\n- `bun run example:openai` writes a sample speech file to `.ora-output/openai-article-sample.mp3`\n- `bun run example:openai-document` exercises paragraph-first document synthesis\n- `bun run example:orchestrator` prints multi-unit orchestration state\n\n## Development\n\n```bash\nbun install\nbun run setup:local\nbun run test\nbun run check\nbun run build\nbun run package:check\nbun run docs:generate\nbun run verify\n```\n\nThe local gateway still serves the repo-backed fallback homepage while docs are generated and proxied in the existing scripts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farach%2Fora","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farach%2Fora","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farach%2Fora/lists"}