{"_id":"@speechmatics/auth","_rev":"3-9cdb985c1446d992c11c2fa41d06ad21","name":"@speechmatics/auth","dist-tags":{"latest":"0.1.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"}}},"time":{"created":"2024-11-20T16:47:04.190Z","modified":"2026-04-24T11:55:28.418Z","0.0.1":"2024-11-20T16:47:04.497Z","0.1.0":"2025-08-06T16:02:46.888Z"},"license":"MIT","keywords":["Speechmatics","authentication","transcription","batch","real-time","text to speech"],"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"}],"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"}