Skip to content

Commit

Permalink
Merge pull request #20 from AssemblyAI/76BA0C3E8E6B68C33DC97D584D7F1CD8
Browse files Browse the repository at this point in the history
Release 3.1.1
  • Loading branch information
Swimburger authored Nov 21, 2023
2 parents 48798bf + e7927bf commit 22ab44e
Show file tree
Hide file tree
Showing 30 changed files with 1,300 additions and 891 deletions.
21 changes: 11 additions & 10 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
{
"root": true,
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": { "project": ["./tsconfig.json"] },
"plugins": [
"@typescript-eslint"
],
"rules": {
},
"ignorePatterns": ["test/**/*", "dist/**/*", "node_modules/**/*", "scripts/**/*"]
"plugins": ["@typescript-eslint"],
"rules": {},
"ignorePatterns": [
"/*.js",
"/*.ts",
"tests",
"dist",
"node_modules",
"scripts"
]
}
68 changes: 34 additions & 34 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,37 @@ jobs:
name: Build and publish to npmjs.com
runs-on: ubuntu-latest
steps:
- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Checkout source code
uses: actions/checkout@v3
- name: Install pnpm
run: npm install -g pnpm@8.7.4
# doesn't work with Node 20
# - name: Install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8.7.4
# run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile false
- name: Build code
run: npm run build
- run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: Setup Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20
- name: Checkout source code
uses: actions/checkout@v3
- name: Install pnpm
run: npm install -g pnpm@8.7.4
# doesn't work with Node 20
# - name: Install pnpm
# uses: pnpm/action-setup@v2
# with:
# version: 8.7.4
# run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install --frozen-lockfile false
- name: Build code
run: npm run build
- run: |
npm config set //registry.npmjs.org/:_authToken=$NPM_AUTH_TOKEN
npm publish
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,7 @@ node_modules
.DS_Store
Thumbs.db

# Ignore built ts files
dist/**/*
dist

# Ignore Jest directory
.jest
1 change: 0 additions & 1 deletion .prettierrc

This file was deleted.

43 changes: 43 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,78 @@
# Changelog

## [3.1.1] - 2023-11-21

### Added

- Add `client.transcripts.transcribe` function to transcribe an audio file with polling until transcript status is `completed` or `error`. This function takes an `audio` option which can be an audio file URL, path, stream, or buffer.
- Add `client.transcripts.submit` function to queue a transcript. You can use `client.transcripts.waitUntilReady` to poll the transcript returned by `submit`. This function also takes an `audio` option which can be an audio file URL, path, stream, or buffer.

### Changed

- Deprecated `client.transcripts.create` in favor of `transcribe` and `submit`, to be more consistent with other AssemblyAI SDKs.
- Renamed types
- Renamed `Parameters` type suffix with `Params` type suffix
- Renamed `CreateTranscriptParameters` to `TranscriptParams`
- Renamed `CreateTranscriptOptionalParameters` to `TranscriptOptionalParams`.
- Added deprecated aliases for the forementioned types
- Improved type docs

## [3.1.0] - 2023-11-16

### Added

- Add `AssemblyAI.transcripts.waitUntilReady` function to wait until a transcript is ready, meaning `status` is `completed` or `error`.
- Add `chars_per_caption` parameter to `AssemblyAI.transcripts.subtitles` function.
- Add `input_text` property to LeMUR functions. Instead of using `transcript_ids`, you can use `input_text` to provide custom formatted transcripts as input to LeMUR.

### Changed

- Change default timeout from 3 minutes to infinite (-1). Fixes [#17](https://github.com/AssemblyAI/assemblyai-node-sdk/issues/17)

### Fixed

- Correctly serialize the keywords for `client.transcripts.wordSearch`.
- Use more widely compatible syntax for wildcard exporting types. Fixes [#18](https://github.com/AssemblyAI/assemblyai-node-sdk/issues/18).

## [3.0.1] - 2023-10-30

### Changed

- The SDK uses `fetch` instead of Axios. This removes the Axios dependency. Axios relies on XMLHttpRequest which isn't supported in Cloudflare Workers, Deno, Bun, etc. By using `fetch`, the SDK is now more compatible on the forementioned runtimes.

### Fixed

- The SDK uses relative imports instead of using path aliases, to make the library transpilable with tsc for consumers. Fixes [#14](https://github.com/AssemblyAI/assemblyai-node-sdk/issues/14).
- Added `speaker` property to the `TranscriptUtterance` type, and removed `channel` property.

## [3.0.0] - 2023-10-24

### Changed

- `AssemblyAI.files.upload` accepts streams and buffers, in addition to a string (path to file).

### Removed

- **Breaking**: The module does not have a default export anymore, because of inconsistent functionality across module systems. Instead, use `AssemblyAI` as a named import like this: `import { AssemblyAI } from 'assemblyai'`.

## [2.0.2] - 2023-10-13

### Added

- `AssemblyAI.transcripts.wordSearch` searches for keywords in the transcript.
- `AssemblyAI.lemur.purgeRequestData` deletes data related to your LeMUR request.
- `RealtimeService.stream` creates a writable stream that you can write audio data to instead of using `RealtimeService.sendAudio``.

### Fixed

- The AssemblyAI class would be exported as default named export instead in certain module systems.

## [2.0.1] - 2023-10-10

Re-implement the Node SDK in TypeScript and add all AssemblyAI APIs.

### Added

- Transcript API client
- LeMUR API client
- Real-time transcript client
Loading

0 comments on commit 22ab44e

Please sign in to comment.