File tree Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Expand file tree Collapse file tree 3 files changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ const service = client.realtime.createService({
173173You can also generate a temporary auth token for real-time.
174174
175175``` typescript
176- const token = await client .realtime .createTemporaryToken ({expires_in = 60 });
176+ const token = await client .realtime .createTemporaryToken ({ expires_in = 60 });
177177const rt = client .realtime .createService ({
178178 token: token
179179});
@@ -212,7 +212,7 @@ getAudio((chunk) => {
212212Close the connection when you're finished.
213213
214214``` typescript
215- rt .close ();
215+ await rt .close ();
216216```
217217
218218# Tests
Original file line number Diff line number Diff line change 1111 "url" : " git+https://github.com/AssemblyAI/assemblyai-node-sdk.git"
1212 },
1313 "publishConfig" : {
14- "tag" : " beta " ,
14+ "tag" : " latest " ,
1515 "access" : " public" ,
1616 "registry" : " https://registry.npmjs.org/"
1717 },
2121 "lint" : " tslint -p tsconfig.json" ,
2222 "test" : " pnpm lint && pnpm test:unit" ,
2323 "test:unit" : " jest --config jest.config.rollup.ts" ,
24- "prettier" : " prettier --write 'src/**/*.ts'" ,
25- "generate-types" : " tsx ./scripts/generate-types.ts && pnpm prettier"
24+ "format" : " prettier --write 'src/**/*.ts'" ,
25+ "generate-types" : " tsx ./scripts/generate-types.ts && pnpm format" ,
26+ "copybara:dry-run" : " ./copybara.sh dry_run --init-history" ,
27+ "copybara:pr" : " ./copybara.sh sync_out --init-history"
2628 },
2729 "keywords" : [
2830 " AssemblyAI" ,
29- " Speech-to-text"
31+ " Speech-to-text" ,
32+ " Transcription" ,
33+ " Audio" ,
34+ " LLM"
3035 ],
3136 "author" : " AssemblyAI (https://www.assemblyai.com)" ,
3237 "license" : " MIT" ,
Original file line number Diff line number Diff line change @@ -10,8 +10,8 @@ const client = new AssemblyAI({
1010( async function transcribeUsingRealtime ( ) {
1111 const useToken = false ;
1212 const serviceParams : any = {
13- sample_rate : 16_000 ,
14- word_boost : [ 'gore' , 'climate' ]
13+ sampleRate : 16_000 ,
14+ wordBoost : [ 'gore' , 'climate' ]
1515 } ;
1616 if ( useToken ) {
1717 serviceParams . token = await client . realtime . createTemporaryToken ( { expires_in : 480 } ) ;
You can’t perform that action at this time.
0 commit comments