Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync latest #10

Merged
merged 1 commit into from
Oct 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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