{"id":29948635,"url":"https://github.com/vbrazo/electron-audio-shot","last_synced_at":"2025-08-03T08:33:32.692Z","repository":{"id":303564850,"uuid":"1015897394","full_name":"vbrazo/electron-audio-shot","owner":"vbrazo","description":"A cross-platform audio capture library for Electron apps with platform-specific permission handling","archived":false,"fork":false,"pushed_at":"2025-07-08T15:45:34.000Z","size":118,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-08T15:53:07.335Z","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/vbrazo.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}},"created_at":"2025-07-08T07:40:15.000Z","updated_at":"2025-07-08T15:45:41.000Z","dependencies_parsed_at":"2025-07-08T11:45:11.631Z","dependency_job_id":null,"html_url":"https://github.com/vbrazo/electron-audio-shot","commit_stats":null,"previous_names":["vbrazo/electron-platform-audio-screenshot","vbrazo/electron-audio-screenshot-kit","vbrazo/electron-audio-shot"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vbrazo/electron-audio-shot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbrazo%2Felectron-audio-shot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbrazo%2Felectron-audio-shot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbrazo%2Felectron-audio-shot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbrazo%2Felectron-audio-shot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vbrazo","download_url":"https://codeload.github.com/vbrazo/electron-audio-shot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vbrazo%2Felectron-audio-shot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268514980,"owners_count":24262536,"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","status":"online","status_checked_at":"2025-08-03T02:00:12.545Z","response_time":2577,"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":"2025-08-03T08:33:28.554Z","updated_at":"2025-08-03T08:33:32.684Z","avatar_url":"https://github.com/vbrazo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# electron-audio-shot\n\nA **completely generic, production-ready npm library** for Electron apps that enables cross-platform audio capture, permission handling, echo cancellation, and screenshot capture capabilities — with full TypeScript and React support.\n\n---\n\n## 🎯 What We've Created\n\nA **universal, drop-in audio + screenshot solution** for any Electron app.\n\n---\n\n## 📦 Features\n\n- ✅ Cross-platform audio capture (macOS, Windows, Linux)\n- ✅ Platform-specific permission handling\n- ✅ Echo cancellation + real-time processing\n- ✅ Screenshot capture (manual + automatic)\n- ✅ TypeScript support with full type definitions\n- ✅ React components for easy integration\n- ✅ Comprehensive testing \u0026 docs\n- ✅ Zero app-specific dependencies\n\n---\n\n## 🛠️ Installation\n\n```bash\nnpm install electron-audio-shot\n```\n\n\u003e ⚠️ Requires `electron \u003e= 20.0.0` as a peer dependency.\n\n---\n\n## 🏗️ Architecture\n\n```\nelectron-audio-shot/\n├── src/\n│   ├── main/                    # Main process services\n│   ├── renderer/                # Renderer process services\n│   ├── components/              # React components\n│   ├── types/                   # Type definitions\n│   ├── constants/               # Shared constants\n│   └── index.ts                 # Entry point\n├── examples/                    # Integration examples\n├── integration-tests/           # Integration tests\n├── test-runner.ts               # Custom test runner\n├── README.md                    # This file\n```\n\n---\n\n## 📋 Platform Support\n\n| Feature           | macOS         | Windows        | Linux          |\n|------------------|----------------|----------------|----------------|\n| System Audio     | ✅ Native      | ✅ Loopback     | ⚠️ Limited     |\n| Microphone       | ✅ Native      | ✅ Native       | ✅ Native      |\n| Echo Cancellation| ✅ Advanced    | ✅ Real-time    | ⚠️ Basic       |\n| Screenshots      | ✅ Native      | ✅ Electron     | ✅ Electron    |\n| Permissions      | System Prefs   | Browser        | Browser        |\n\n---\n\n## ⚙️ Quick Start\n\n### Main Process\n\n```ts\nimport { audioScreenshotService } from 'electron-audio-shot';\n\nconst service = new audioScreenshotService({\n  sampleRate: 24000,\n  chunkDuration: 0.1,\n  enableEchoCancellation: true,\n});\n\nservice.setupIpcHandlers();\n```\n\n### Renderer Process\n\n```ts\nimport { PlatformAudioCapture } from 'electron-audio-shot';\n\nconst audioCapture = new PlatformAudioCapture();\nawait audioCapture.startCapture(5, 'medium');    // Start recording\nconst result = await audioCapture.stopCapture(); // Stop and retrieve chunks\n```\n\n---\n\n## 💻 React Example\n\n```tsx\nimport { useState } from 'react';\nimport {\n  PlatformAudioCapture,\n  PlatformPermissionChecker\n} from 'electron-audio-shot';\n\nexport function AudioRecorder() {\n  const [isRecording, setIsRecording] = useState(false);\n  const audioCapture = new PlatformAudioCapture();\n\n  return (\n    \u003cdiv\u003e\n      \u003cPlatformPermissionChecker\n        onPermissionsReady={() =\u003e console.log('Ready')}\n        onPermissionsError={(err) =\u003e console.error(err)}\n      /\u003e\n      \u003cbutton onClick={async () =\u003e {\n        const res = await audioCapture.startCapture(5, 'medium');\n        if (res.success) setIsRecording(true);\n      }}\u003e\n        Start Recording\n      \u003c/button\u003e\n    \u003c/div\u003e\n  );\n}\n```\n\n---\n\n## 📚 API Reference\n\n### `audioScreenshotService` (Main)\n\n```ts\nnew audioScreenshotService(config)\nsetupIpcHandlers()\nstartAudioCapture()\nstopAudioCapture()\ncaptureScreenshot()\ngetPlatform()\ngetConfig()\nupdateConfig(partialConfig)\n```\n\n### `PlatformAudioCapture` (Renderer)\n\n```ts\nnew PlatformAudioCapture()\nstartCapture(interval, quality)\nstopCapture()\ncaptureManualScreenshot(quality)\ngetState()\nonAudioChunk(cb)\n```\n\n### React Components\n\n```tsx\n\u003cPlatformPermissionChecker\n  onPermissionsReady={() =\u003e {}}\n  onPermissionsError={(err) =\u003e {}}\n/\u003e\n\n\u003cAudioCaptureUI\n  onRecordingComplete={(chunks) =\u003e {}}\n  onError={(err) =\u003e {}}\n/\u003e\n```\n\n---\n\n## 🧪 Testing\n\n```bash\nnpm run test:basic        # Basic structure\nnpm run test:integration  # Platform flows\nnpm test                  # All tests\n```\n\nPlatform testing instructions included in inline comments.\n\n---\n\n## 📊 Performance\n\n| Metric             | Value                                      |\n|--------------------|--------------------------------------------|\n| Audio Latency      | \u003c 50ms                                     |\n| Sample Rate        | 24kHz (configurable)                       |\n| Screenshot Sizes   | Low (~100KB), Medium (~300KB), High (~1MB) |\n| Memory Use         | \u003c10MB typical                              |\n\n---\n\n## 🎯 Use Cases\n\n- 🎙️ Voice memo apps\n- 🧠 AI assistants with context\n- 🎥 Screen/audio recorders\n- 📅 Meeting note-takers\n\n---\n\n## 🔧 Advanced Usage\n\n### Real-time Streaming\n\n```ts\naudioCapture.onAudioChunk(chunk =\u003e streamToServer(chunk));\n```\n\n### Manual Screenshot\n\n```ts\nawait audioCapture.captureManualScreenshot('high');\n```\n\n---\n\n## 🤝 Contributing\n\n```bash\ngit clone https://github.com/vbrazo/electron-audio-shot\ncd electron-audio-shot\nnpm install\nnpm run build\nnpm test\n```\n\n- Fork → Feature branch → PR with tests.\n\n---\n\n## 📄 License\n\nMIT © Vitor Oliveira\n\n---\n\n## 🔮 Future Enhancements\n\n- 🔴 Video capture\n- ☁️ Cloud upload\n- 🌐 WebRTC integration\n- 🎛️ Advanced filters\n- 🔌 Plugin system\n\n---\n\n## 🆘 Support\n\n- [GitHub Issues](https://github.com/vbrazo/electron-audio-shot/issues)\n- [Wiki](https://github.com/vbrazo/electron-audio-shot/wiki)\n\n---\n\n## 📦 npm Package\n\n```json\n{\n  \"name\": \"electron-audio-shot\",\n  \"version\": \"1.0.0\",\n  \"description\": \"Cross-platform audio + screenshot for Electron\",\n  \"main\": \"dist/index.js\",\n  \"types\": \"dist/index.d.ts\",\n  \"peerDependencies\": {\n    \"electron\": \"\u003e=20.0.0\"\n  }\n}\n```\n\n---\n\n## 📈 Summary\n\n- ✅ Generic, production-ready\n- ✅ Cross-platform\n- ✅ Easy to integrate\n- ✅ React-compatible\n- ✅ Well-tested and documented\n- ✅ Community-ready\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbrazo%2Felectron-audio-shot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvbrazo%2Felectron-audio-shot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvbrazo%2Felectron-audio-shot/lists"}