{"_id":"@speechmatics/auth","_rev":"5-a9fa7f10ad3cb9015eca559b5cd2b27a","name":"@speechmatics/auth","dist-tags":{"latest":"1.0.0"},"versions":{"0.0.1":{"name":"@speechmatics/auth","version":"0.0.1","keywords":["Speechmatics","authentication","transcription","batch","real-time"],"license":"MIT","_id":"@speechmatics/auth@0.0.1","maintainers":[{"name":"speechmatics-devrel","email":"devrel@speechmatics.com"},{"name":"speechmatics_selfserve","email":"selfserve@speechmatics.com"}],"dist":{"shasum":"93ae31c27724bb1280315f244dcd4d40ba772eac","tarball":"https://registry.npmjs.org/@speechmatics/auth/-/auth-0.0.1.tgz","fileCount":8,"integrity":"sha512-GtHE3guy6dCULLKnUQK+Kb0+66e1fyDA7tGQM8Wwf0W4E2nbDaMITWg0d3RzBL0pYoTuNDdPJdkrj9Thy0W32A==","signatures":[{"sig":"MEUCIDIyZLwEeU+6wpUlYpZ9Jel3HtFVTEmJHAY+4YYDQRhHAiEAqZ1VZAsyIOICzLJBVvLY0HVeoL/DNsi82sGugBEW70o=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":14655},"main":"dist/index.js","_from":"file:speechmatics-auth-0.0.1.tgz","module":"dist/index.mjs","scripts":{"test":"node --import tsx ./test/index.test.ts","build":"rm -rf dist && rollup -c"},"typings":"dist/index.d.ts","_npmUser":{"name":"speechmatics-devrel","email":"devrel@speechmatics.com"},"_resolved":"/tmp/56a21e23fe555116b6d25caf6659ba89/speechmatics-auth-0.0.1.tgz","_integrity":"sha512-GtHE3guy6dCULLKnUQK+Kb0+66e1fyDA7tGQM8Wwf0W4E2nbDaMITWg0d3RzBL0pYoTuNDdPJdkrj9Thy0W32A==","_npmVersion":"10.8.2","description":"Library for fetching temporary keys for Speechmatics APIs","directories":{},"_nodeVersion":"20.18.0","_hasShrinkwrap":false,"devDependencies":{"jwt-decode":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.0.1_1732121224317_0.8503170863009428","host":"s3://npm-registry-packages"}},"0.1.0":{"name":"@speechmatics/auth","version":"0.1.0","keywords":["Speechmatics","authentication","transcription","batch","real-time","text to speech"],"license":"MIT","_id":"@speechmatics/auth@0.1.0","maintainers":[{"name":"speechmatics_selfserve","email":"selfserve@speechmatics.com"},{"name":"speechmatics-devrel","email":"devrel@speechmatics.com"}],"dist":{"shasum":"0e61af39e5b1c1a45cb53bac08a31cb09cff69ea","tarball":"https://registry.npmjs.org/@speechmatics/auth/-/auth-0.1.0.tgz","fileCount":8,"integrity":"sha512-vF1XOFlAtbNSWYsuJm9WDAZfZIOpwibgqu0sH/Qqkbyz2w/EQyoIhlKta8KRVZ74JeKyY08mnGQ17WDj6i6U4Q==","signatures":[{"sig":"MEUCIBfot4gmsCmcSfTVFi9W7GuKXG7KaA8jVtazjAc8fre5AiEAwFSiJ8EUceHGl5QKWvR4M8wNuQc4zFqHWnx5YNdrkE4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14701},"main":"dist/index.js","_from":"file:speechmatics-auth-0.1.0.tgz","module":"dist/index.mjs","scripts":{"test":"node --import tsx ./test/index.test.ts","build":"rm -rf dist && rollup -c"},"typings":"dist/index.d.ts","_npmUser":{"name":"speechmatics-devrel","email":"devrel@speechmatics.com"},"_resolved":"/tmp/5bf3b5eb453f5e3aa667cc1db31fedee/speechmatics-auth-0.1.0.tgz","_integrity":"sha512-vF1XOFlAtbNSWYsuJm9WDAZfZIOpwibgqu0sH/Qqkbyz2w/EQyoIhlKta8KRVZ74JeKyY08mnGQ17WDj6i6U4Q==","_npmVersion":"10.9.2","description":"Library for fetching temporary keys for Speechmatics APIs","directories":{},"_nodeVersion":"22.17.1","_hasShrinkwrap":false,"devDependencies":{"jwt-decode":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_0.1.0_1754496166690_0.3272314697190697","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@speechmatics/auth","version":"1.0.0","keywords":["Speechmatics","authentication","transcription","batch","real-time","text to speech"],"license":"MIT","_id":"@speechmatics/auth@1.0.0","maintainers":[{"name":"speechmatics_selfserve","email":"selfserve@speechmatics.com"},{"name":"speechmatics-devrel","email":"devrel@speechmatics.com"},{"name":"mnemitz","email":"matt.nemitz@gmail.com"}],"homepage":"https://github.com/speechmatics/speechmatics-js-sdk/tree/main#readme","bugs":{"url":"https://github.com/speechmatics/speechmatics-js-sdk/issues"},"dist":{"shasum":"ee769143dd68e8093a699ded8db7fdb3d4ce3ac5","tarball":"https://registry.npmjs.org/@speechmatics/auth/-/auth-1.0.0.tgz","fileCount":8,"integrity":"sha512-ujpk0ryu5b525RLN1ZZDxU8/R0qHTzcsYmZ2wJ9/GJLYue5LeZgZ4RsY/MgSEU11b4tys7UR6kBADge/YBCiZQ==","signatures":[{"sig":"MEUCIQChiZ5tRZZ8I6SHR1NjBjEuDjswHKzYYy5bZYbPfSxMXwIgbtB8o+xHwK1rGHziNJstJX47eahuMLV99UJN1USEKVc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEYCIQCbEzziWBlsJTJTeur/C09xM69bo2snOcF5oK1xw5vj4wIhAKpql5EEI9kbU+RhWGrnWzG7VWvNPj/jeT+En6aNuzcZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@speechmatics%2fauth@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":15208},"main":"dist/index.js","_from":"file:speechmatics-auth-1.0.0.tgz","module":"dist/index.mjs","scripts":{"test":"node --import tsx ./test/index.test.ts","build":"rm -rf dist && rollup -c"},"typings":"dist/index.d.ts","_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"9211f241-a878-4b7c-a8f2-1a9997244650"}},"_resolved":"/tmp/1018cb590b59b240eda41886f87ebcc7/speechmatics-auth-1.0.0.tgz","_integrity":"sha512-ujpk0ryu5b525RLN1ZZDxU8/R0qHTzcsYmZ2wJ9/GJLYue5LeZgZ4RsY/MgSEU11b4tys7UR6kBADge/YBCiZQ==","repository":{"url":"git+https://github.com/speechmatics/speechmatics-js-sdk.git#main","type":"git"},"_npmVersion":"11.12.1","description":"Library for fetching temporary keys for Speechmatics APIs","directories":{},"_nodeVersion":"24.15.0","_hasShrinkwrap":false,"devDependencies":{"jwt-decode":"^4.0.0"},"_npmOperationalInternal":{"tmp":"tmp/auth_1.0.0_1794310582431_0.30409820920188824","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2024-11-20T16:47:04.190Z","modified":"2026-11-20T01:20:53.494Z","0.0.1":"2024-11-20T16:47:04.497Z","0.1.0":"2025-08-06T16:02:46.888Z","1.0.0":"2026-11-10T11:36:22.516Z"},"bugs":{"url":"https://github.com/speechmatics/speechmatics-js-sdk/issues"},"license":"MIT","homepage":"https://github.com/speechmatics/speechmatics-js-sdk/tree/main#readme","keywords":["Speechmatics","authentication","transcription","batch","real-time","text to speech"],"repository":{"url":"git+https://github.com/speechmatics/speechmatics-js-sdk.git#main","type":"git"},"description":"Library for fetching temporary keys for Speechmatics APIs","maintainers":[{"email":"selfserve@speechmatics.com","name":"speechmatics_selfserve"},{"email":"devrel@speechmatics.com","name":"speechmatics-devrel"},{"email":"matt.nemitz@gmail.com","name":"mnemitz"},{"email":"james.walker@speechmatics.com","name":"sm_jamesw"}],"readme":"# Speechmatics authentication 🔑\n\nLibrary for managing authentication with Speechmatics APIs\n\n## Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Installation\n\n```sh\nnpm i @speechmatics/auth\n```\n\n## Usage\n\n```typescript\nimport { RealtimeClient } from '@speechmatics/real-time-client';\nimport { createSpeechmaticsJWT } from '@speechmatics/auth';\n\nconst client = new RealtimeClient();\n\nclient.addEventListener('receiveMessage', ({ data }) => {\n  // Handle transcription messages\n});\n\nasync function transcribeFileRealtime () {\n  const jwt = await createSpeechmaticsJWT({\n    type: 'rt',\n    apiKey,\n    ttl: 60, // 1 minute\n  });\n\n  const fileStream = fs.createReadStream(\n    path.join(__dirname, './example.wav'),\n    {\n      highWaterMark: 4096, //avoid sending faster than realtime\n    },\n  );\n\n  await client.start(jwt, {\n    transcription_config: {\n      language: 'en',\n      enable_partials: true,\n    },\n  });\n\n  //send it\n  fileStream.on('data', (sample) => {\n    client.sendAudio(sample);\n  });\n\n  //end the session\n  fileStream.on('end', () => {\n    client.stopRecognition();\n  });\n}\n\ntranscribeFileRealtime();\n```\n\n## Contributing\n\nContributions are welcome! Please open an issue or submit a pull request for any changes.\n\n## License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.","readmeFilename":"README.md"}