{"_id":"@camb-ai/browser-sdk","_rev":"8-ff7a35847829b87c4484db332c0b971e","name":"@camb-ai/browser-sdk","dist-tags":{"latest":"1.0.3"},"versions":{"1.0.1":{"name":"@camb-ai/browser-sdk","version":"1.0.1","keywords":["camb","ai","browser","sdk","camb.ai","text-to-speech","tts","voice-cloning","dubbing","audio-generation","speech-synthesis"],"author":{"name":"Camb.ai"},"license":"MIT","_id":"@camb-ai/browser-sdk@1.0.1","maintainers":[{"name":"arnavm","email":"arnavmehta.contact@gmail.com"},{"name":"ravenur","email":"tanbaynurbol@gmail.com"}],"dist":{"shasum":"80a5fa5f98adf21e6db457c6851cd4b9c84dc17c","tarball":"https://registry.npmjs.org/@camb-ai/browser-sdk/-/browser-sdk-1.0.1.tgz","fileCount":1115,"integrity":"sha512-Ue+QfARplx993T+EKJL8K9JV2T/G60yZlBo4mdDyeX/wplE1JIt5PsH1GKVdor+KRfgqM9yWY36oL9TRJqe/1w==","signatures":[{"sig":"MEYCIQDUvII4wieQG3Q4KleljpkjfCu+ZAaPZ9D7Kz8VnkekFAIhANxv1sSCBDL3Go0Quv8vAo5ef7eRLNuEBlyBHdDiP3DY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":945251},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"33108316f095a4d0d9b1fd6a79f2d7174a3b9c0e","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"ravenur","email":"tanbaynurbol@gmail.com"},"_npmVersion":"9.2.0","description":"Official Browser SDK for Camb.ai","directories":{},"_nodeVersion":"18.19.1","dependencies":{"qs":"^6.11.2","url-join":"^5.0.0","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/browser-sdk_1.0.1_1769952001764_0.5404941805036436","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@camb-ai/browser-sdk","version":"1.0.2","keywords":["camb","ai","browser","sdk","camb.ai","text-to-speech","tts","voice-cloning","dubbing","audio-generation","speech-synthesis"],"author":{"name":"Camb.ai"},"license":"MIT","_id":"@camb-ai/browser-sdk@1.0.2","maintainers":[{"name":"neilruaro-camb","email":"neil.ruaro@camb.ai"},{"name":"arnavm","email":"arnavmehta.contact@gmail.com"},{"name":"ravenur","email":"tanbaynurbol@gmail.com"}],"dist":{"shasum":"e7f73d24452c96c04286bccce5688ea2702ecde3","tarball":"https://registry.npmjs.org/@camb-ai/browser-sdk/-/browser-sdk-1.0.2.tgz","fileCount":555,"integrity":"sha512-MSTTH3vFhFTcRJ7VPmT3H8YlIXhGUQFJ5z9zG8T2+Kn9LB/7jR2puUQ/yfRg6K7tmlTgD7mK0w6gUthvWh2mcA==","signatures":[{"sig":"MEQCIGQM1JjBNKLwxKbDQlnoc9Qq4/0lzuoX2jnvXj4bwyZ5AiBl3gFwoBGHX8oXVRt2qW4Fo3jgxtjT4C35nURiXGLz2A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":473645},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","module":"dist/index.js","gitHead":"7aa6a96e22b66f60bb710d16cc2c835fc45b445d","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"ravenur","email":"tanbaynurbol@gmail.com"},"_npmVersion":"11.9.0","description":"Official Browser SDK for Camb.ai","directories":{},"_nodeVersion":"25.6.1","dependencies":{"qs":"^6.11.2","url-join":"^5.0.0","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/browser-sdk_1.0.2_1772269241053_0.8333510653819649","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@camb-ai/browser-sdk","version":"1.0.3","keywords":["camb","ai","browser","sdk","camb.ai","text-to-speech","tts","voice-cloning","dubbing","audio-generation","speech-synthesis"],"author":{"name":"Camb.ai"},"license":"MIT","_id":"@camb-ai/browser-sdk@1.0.3","maintainers":[{"name":"neilruaro-camb","email":"neil.ruaro@camb.ai"},{"name":"arnavm","email":"arnavmehta.contact@gmail.com"},{"name":"ravenur","email":"tanbaynurbol@gmail.com"}],"dist":{"shasum":"d6638cc43fb742112eda0360eb365194f3d4aa99","tarball":"https://registry.npmjs.org/@camb-ai/browser-sdk/-/browser-sdk-1.0.3.tgz","fileCount":563,"integrity":"sha512-88MKdER0+sWWWqxZ/zINiTDmqVXKAX0MuxQKnA7Y1aL4apu+WH8z60suWiPMctevDuQDT3fOIP2xdRHK/KQzBQ==","signatures":[{"sig":"MEQCIDgTmpJ6xpaEVrabcCzP1dpDIg1AKs6QgNMeGh/g/8wQAiAeBZCEjAihbGJEqv0rj8G77GVhCdkjp5V/E67j1f2UPQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":477118},"main":"dist/src/index.js","type":"module","types":"dist/src/index.d.ts","module":"dist/src/index.js","gitHead":"7aa6a96e22b66f60bb710d16cc2c835fc45b445d","scripts":{"build":"tsc","prepublishOnly":"npm run build"},"_npmUser":{"name":"ravenur","email":"tanbaynurbol@gmail.com"},"_npmVersion":"11.9.0","description":"Official Browser SDK for Camb.ai","directories":{},"_nodeVersion":"25.6.1","dependencies":{"qs":"^6.11.2","url-join":"^5.0.0","form-data":"^4.0.0"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.3","@types/node":"^20.10.0"},"_npmOperationalInternal":{"tmp":"tmp/browser-sdk_1.0.3_1772270334937_0.3818723796853083","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-02-01T13:20:01.650Z","modified":"2026-06-06T21:24:51.866Z","1.0.1":"2026-02-01T13:20:01.980Z","1.0.2":"2026-02-28T09:00:41.215Z","1.0.3":"2026-02-28T09:18:55.146Z"},"author":{"name":"Camb.ai"},"license":"MIT","keywords":["camb","ai","browser","sdk","camb.ai","text-to-speech","tts","voice-cloning","dubbing","audio-generation","speech-synthesis"],"description":"Official Browser SDK for Camb.ai","maintainers":[{"email":"arnavmehta.contact@gmail.com","name":"arnavm"},{"email":"divyam.gupta@camb.ai","name":"divyam-camb"},{"email":"ahmad.zaweet@camb.ai","name":"azcamb"}],"readme":"# Camb.ai Browser SDK\n\nThe official Browser SDK for interacting with [Camb.ai](https://camb.ai)'s powerful voice and audio generation APIs directly from client-side applications.\n\n## ✨ Features\n\n- **Text-to-Speech (TTS)**: Generate high-fidelity speech from text.\n- **Dubbing**: End-to-end video dubbing and translation.\n- **Generative Voices**: Create new unique voices from text descriptions.\n- **Custom Providers**: Extensible architecture to support custom TTS providers.\n- **Type-Safe**: Fully typed with TypeScript for a robust development experience.\n- **Browser Optimized**: Designed for client-side usage with native `fetch` and `FormData`.\n\n## 📦 Installation\n\n```bash\nnpm install @camb-ai/browser-sdk@v1.0.3\n```\n\n## 🔑 Authentication\n\nInitialize the client with your API key.\n\n```typescript\nimport { CambClient } from \"@camb-ai/browser-sdk\";\n\nconst client = new CambClient({\n  apiKey: \"YOUR_CAMB_API_KEY\", // Ideally from process.env or a secure source\n});\n```\n\n## 🚀 Examples\n\n### 1. Text-to-Speech (TTS)\n\nGenerate audio from text.\n\n```typescript\nimport { CambClient, Languages } from \"@camb-ai/browser-sdk\";\n\nconst client = new CambClient({ apiKey: \"...\" });\n\nasync function generateSpeech() {\n  const response = await client.tts.create({\n    text: \"Hello from the Browser SDK!\",\n    voice_id: 20303, // Standard Voice\n    language: Languages.EN_US,\n  });\n\n  console.log(\"TTS Task ID:\", response.task_id);\n}\n```\n\n### 2. End-to-End Dubbing\n\nDub a video from one language to another.\n\n```typescript\nimport { CambClient, Languages } from \"@camb-ai/browser-sdk\";\n\nconst client = new CambClient({ apiKey: \"...\" });\n\nasync function dubVideo() {\n  const response = await client.dubbing.endToEnd({\n    video_url: \"https://example.com/video.mp4\",\n    source_language: Languages.EN_US,\n    target_languages: [Languages.FR_FR],\n  });\n\n  console.log(\"Dubbing Task ID:\", response.task_id);\n}\n```\n\n## 🛠️ Custom Providers\n\nThe SDK supports custom TTS providers through the `TtsProvider` interface. This allows you to integrate third-party services (like Baseten or Vertex AI) while keeping a unified API surface.\n\n### Implementing a Custom Provider\n\nCreate a class that implements the `TtsProvider` interface:\n\n```typescript\nimport { TtsProvider, CambClient } from \"@camb-ai/browser-sdk\";\n\nclass MyCustomProvider implements TtsProvider {\n  // Implementation details...\n  async generate(text: string, options: any): Promise<any> {\n     // specific implementation\n  }\n}\n\n// Pass provider specific options if supported\nconst client = new CambClient({\n    apiKey: \"...\",\n    // custom settings if extended\n});\n```\n\n*(Note: Full custom provider integration details typically involve configuring the client to delegate requests, which may vary based on exact SDK version features.)*\n\n## License\n\nMIT\n","readmeFilename":"README.md"}