diff --git a/README.md b/README.md index fa1b298..c7de243 100644 --- a/README.md +++ b/README.md @@ -173,7 +173,7 @@ const service = client.realtime.createService({ You can also generate a temporary auth token for real-time. ```typescript -const token = await client.realtime.createTemporaryToken({expires_in = 60}); +const token = await client.realtime.createTemporaryToken({ expires_in = 60 }); const rt = client.realtime.createService({ token: token }); @@ -212,7 +212,7 @@ getAudio((chunk) => { Close the connection when you're finished. ```typescript -rt.close(); +await rt.close(); ``` # Tests diff --git a/package.json b/package.json index de8ee2c..7e8ca48 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ "url": "git+https://github.com/AssemblyAI/assemblyai-node-sdk.git" }, "publishConfig": { - "tag": "beta", + "tag": "latest", "access": "public", "registry": "https://registry.npmjs.org/" }, @@ -21,12 +21,17 @@ "lint": "tslint -p tsconfig.json", "test": "pnpm lint && pnpm test:unit", "test:unit": "jest --config jest.config.rollup.ts", - "prettier": "prettier --write 'src/**/*.ts'", - "generate-types": "tsx ./scripts/generate-types.ts && pnpm prettier" + "format": "prettier --write 'src/**/*.ts'", + "generate-types": "tsx ./scripts/generate-types.ts && pnpm format", + "copybara:dry-run": "./copybara.sh dry_run --init-history", + "copybara:pr": "./copybara.sh sync_out --init-history" }, "keywords": [ "AssemblyAI", - "Speech-to-text" + "Speech-to-text", + "Transcription", + "Audio", + "LLM" ], "author": "AssemblyAI (https://www.assemblyai.com)", "license": "MIT", diff --git a/scripts/kitchensink.ts b/scripts/kitchensink.ts index fab1f45..e377413 100644 --- a/scripts/kitchensink.ts +++ b/scripts/kitchensink.ts @@ -10,8 +10,8 @@ const client = new AssemblyAI({ (async function transcribeUsingRealtime() { const useToken = false; const serviceParams: any = { - sample_rate: 16_000, - word_boost: ['gore', 'climate'] + sampleRate: 16_000, + wordBoost: ['gore', 'climate'] }; if (useToken) { serviceParams.token = await client.realtime.createTemporaryToken({ expires_in: 480 });