Skip to content

Commit

Permalink
Merge pull request #10 from AssemblyAI/4993FAF28FFD402259A9E17791C0363A
Browse files Browse the repository at this point in the history
Sync latest
  • Loading branch information
Swimburger committed Oct 10, 2023
2 parents a372926 + b48d5eb commit 0af79d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
});
Expand Down Expand Up @@ -212,7 +212,7 @@ getAudio((chunk) => {
Close the connection when you're finished.

```typescript
rt.close();
await rt.close();
```

# Tests
Expand Down
13 changes: 9 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
},
Expand All @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions scripts/kitchensink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
Expand Down

0 comments on commit 0af79d3

Please sign in to comment.