{"id":50718739,"url":"https://github.com/ysdede/parakeet.js-benchmark","last_synced_at":"2026-06-09T21:31:00.359Z","repository":{"id":340876878,"uuid":"1167997589","full_name":"ysdede/parakeet.js-benchmark","owner":"ysdede","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-27T00:20:01.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-27T05:37:13.408Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ysdede.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":null,"dco":null,"cla":null}},"created_at":"2026-02-26T22:54:41.000Z","updated_at":"2026-02-27T00:20:06.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/ysdede/parakeet.js-benchmark","commit_stats":null,"previous_names":["ysdede/parakeet.js-benchmark"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/ysdede/parakeet.js-benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdede%2Fparakeet.js-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdede%2Fparakeet.js-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdede%2Fparakeet.js-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdede%2Fparakeet.js-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ysdede","download_url":"https://codeload.github.com/ysdede/parakeet.js-benchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ysdede%2Fparakeet.js-benchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34127342,"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-09T02:00:06.510Z","response_time":63,"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-09T21:30:59.077Z","updated_at":"2026-06-09T21:31:00.347Z","avatar_url":"https://github.com/ysdede.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Parakeet.js Demo\n\nThis is the unified demo application for parakeet.js. It can be used for:\n- **Development**: Testing local source code changes\n- **NPM Testing**: Testing the published npm package\n- **Deployment**: Deploying to HuggingFace Spaces and GitHub Pages\n\n## Quick Start\n\n```bash\ncd examples/demo\nnpm install\n```\n\n## Development Modes\n\n### Local Development (Test Local Changes)\n\nUse this when modifying the parakeet.js library source code:\n\n```bash\nnpm run dev:local\n```\n\nThis runs Vite with the `PARAKEET_LOCAL=true` environment variable, which aliases `parakeet.js` imports to `/src/index.js` instead of the npm package.\n\n**When to use:**\n- Developing new features in `/src/`\n- Debugging issues in the library\n- Testing before publishing to npm\n\n### NPM Package Testing\n\nUse this to test the published npm package (simulates end-user experience):\n\n```bash\nnpm run dev\n```\n\nThis uses the `parakeet.js` package from npm (version specified in `package.json`).\n\n**When to use:**\n- Verifying the published package works correctly\n- Testing after `npm publish`\n- Before deploying to production\n\n## Version Display\n\nThe demo header shows the active `parakeet.js` version/source and the loaded `onnxruntime-web` runtime version.\n\n- **Local mode** (`PARAKEET_LOCAL=true`): shows the root repo version.\n- **NPM mode**: shows the version from `node_modules/parakeet.js`.\n\n## Building\n\n### Local Source Build\n```bash\nnpm run build:local\n```\n\n### NPM Package Build\n```bash\nnpm run build\n```\n\n## Deployment\n\n### HuggingFace Spaces\n\nDeploy to HuggingFace Spaces (uses npm package build):\n\n```bash\nnpm run deploy-to-hf\n```\n\nThis will:\n1. Build the app with `npm run build`\n2. Clone the HF Space repository\n3. Copy build files and space template\n4. Push to HuggingFace\n\n**Requirements:**\n- HuggingFace CLI logged in (`huggingface-cli login`)\n- Write access to the Space repository\n\n### GitHub Pages\n\nGitHub Pages deployment is automated via GitHub Actions and uses a **local source build** (`build:local`) so the live page always reflects the latest repository code, even before an npm publish.\n\n**Automatic Deployment:**\nPushing changes to `examples/demo/**` or `src/**` on the `master` branch triggers the workflow.\n\n**Manual Trigger:**\n```bash\ngh workflow run deploy-gh-pages.yml\n```\n\n**Check Status:**\n```bash\ngh run list --workflow=\"deploy-gh-pages.yml\"\n```\n\n## Cross-Origin Isolation\n\nBoth deployment targets require Cross-Origin Isolation headers for `SharedArrayBuffer` support (multi-threaded WASM):\n\n### HuggingFace Spaces\nHeaders are configured in `space_template/README.md`:\n```yaml\ncustom_headers:\n  cross-origin-embedder-policy: credentialless\n  cross-origin-opener-policy: same-origin\n```\n\n### GitHub Pages\nSince GitHub Pages doesn't support custom headers, we use `coi-serviceworker.js` which is included in the build.\n\n## Directory Structure\n\n```\ndemo/\n├── src/\n│   ├── App.jsx          # Main React component\n│   ├── App.css          # Styles\n│   └── utils/           # Utility functions\n├── public/\n│   ├── assets/          # Static assets (test audio)\n│   └── coi-serviceworker.js  # Cross-origin isolation workaround\n├── scripts/\n│   └── deploy-to-hf.js  # HF deployment script\n├── space_template/\n│   └── README.md        # HF Space configuration\n├── vite.config.js       # Vite config with local/npm switching\n└── package.json         # Scripts and dependencies\n```\n\n## Troubleshooting\n\n### \"SharedArrayBuffer unavailable\" warning\n- **Local dev**: Should work automatically (Vite sets COOP/COEP headers)\n- **HF Spaces**: Check `space_template/README.md` has `custom_headers`\n- **GitHub Pages**: Ensure `coi-serviceworker.js` is in the build\n\n### Model loading fails with memory error\n- Check browser DevTools isn't pausing on potential OOM\n- Try closing other browser tabs to free memory\n- Prefer `fp16` on WebGPU; this demo retries with `fp32` if `fp16` fails, while the core API does not auto-switch. Use `int8` for smallest files.\n\n### Changes not reflected after deployment\n- GitHub Pages: Wait 1-2 minutes for CDN cache\n- HF Spaces: Wait for Space rebuild (~1 minute)\n- Clear browser cache or use incognito window\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysdede%2Fparakeet.js-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fysdede%2Fparakeet.js-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fysdede%2Fparakeet.js-benchmark/lists"}