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

Launch #1

Merged
merged 111 commits into from
Jan 26, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
111 commits
Select commit Hold shift + click to select a range
3079603
Add logo, scaffold nav
haydenbleasel Jan 24, 2025
c097f29
Scaffold hero and providers
haydenbleasel Jan 24, 2025
3ad078a
Finish hero and feature sections
haydenbleasel Jan 24, 2025
03fc13d
Rework snippets into tabs
haydenbleasel Jan 24, 2025
fba7217
Add animations
haydenbleasel Jan 24, 2025
2dafe52
Add vercel analytics, restore code copy
haydenbleasel Jan 24, 2025
e80ec14
Add waveform animation
haydenbleasel Jan 24, 2025
9b388c4
Wire up navbar
haydenbleasel Jan 24, 2025
ba192eb
Misc fixes
haydenbleasel Jan 24, 2025
a3d84e4
Responsive design
haydenbleasel Jan 24, 2025
29cc9f4
Add metadata
haydenbleasel Jan 24, 2025
fb2af84
Copy updates
haydenbleasel Jan 24, 2025
809decf
Update tabs.tsx
haydenbleasel Jan 24, 2025
31e79b5
Add JSDoc annotations
haydenbleasel Jan 24, 2025
da52aad
Create push.yml
haydenbleasel Jan 24, 2025
cf5b8bd
Create SECURITY.md
haydenbleasel Jan 24, 2025
7f18e83
Setup auto
haydenbleasel Jan 24, 2025
620d805
Create README.md
haydenbleasel Jan 24, 2025
dc5c010
Allow assembly options
haydenbleasel Jan 24, 2025
8ae1486
Allow eleven labs options
haydenbleasel Jan 24, 2025
e76dfac
Allow google options
haydenbleasel Jan 24, 2025
0788361
Update index.ts
haydenbleasel Jan 24, 2025
ec4dd25
Allow for IBM options
haydenbleasel Jan 24, 2025
31bd64d
Add IBM models
haydenbleasel Jan 24, 2025
a0ff541
Update index.tsx
haydenbleasel Jan 24, 2025
8234b3b
Break up files
haydenbleasel Jan 24, 2025
8acda77
Use build version for testing
haydenbleasel Jan 24, 2025
484ee0c
Rename website folder
haydenbleasel Jan 25, 2025
1a51266
Scaffold fumadocs
haydenbleasel Jan 25, 2025
ffcccf0
Merge websites
haydenbleasel Jan 25, 2025
3b7287b
Fix refs, update docs styles
haydenbleasel Jan 25, 2025
6647ab5
Scaffold initial docs
haydenbleasel Jan 25, 2025
7ebab4c
Rename assembly image
haydenbleasel Jan 25, 2025
5438f75
Add support for OpenAI custom props
haydenbleasel Jan 25, 2025
6c0d48f
Scaffold OpenAI docs
haydenbleasel Jan 25, 2025
e694296
Assembly docs
haydenbleasel Jan 25, 2025
a2aeff3
Update azure.mdx
haydenbleasel Jan 25, 2025
9e1c512
Update elevenlabs.mdx
haydenbleasel Jan 25, 2025
efd474b
Update variable names
haydenbleasel Jan 25, 2025
a6bb37e
Update openai.mdx
haydenbleasel Jan 25, 2025
a721722
Update google.mdx
haydenbleasel Jan 25, 2025
9bfff2f
Update ibm.mdx
haydenbleasel Jan 25, 2025
0d55ef9
Update titles
haydenbleasel Jan 25, 2025
a346afe
Scaffold functionality pages
haydenbleasel Jan 25, 2025
066d497
Create installation.mdx
haydenbleasel Jan 25, 2025
c0a99e6
Misc cleanup
haydenbleasel Jan 25, 2025
db4a09e
Split up tests, migrate to vitest
haydenbleasel Jan 25, 2025
3edb430
Update output folder
haydenbleasel Jan 25, 2025
13a86a5
Create test.mp3
haydenbleasel Jan 25, 2025
199a964
Split up tests
haydenbleasel Jan 25, 2025
9908881
Add shorter test file
haydenbleasel Jan 25, 2025
b67db86
Fix import refs
haydenbleasel Jan 25, 2025
c18c691
Fix vite environment and vars
haydenbleasel Jan 25, 2025
e94b4c9
Add default language code to google
haydenbleasel Jan 25, 2025
cc8d383
Run tests on source code
haydenbleasel Jan 25, 2025
4833099
Pass default languageCode to google speech
haydenbleasel Jan 25, 2025
171029e
Attempt to convert google buffer to arraybuffer
haydenbleasel Jan 25, 2025
bf48942
Switch to Files
haydenbleasel Jan 25, 2025
c03e4fa
Update stt.mdx
haydenbleasel Jan 25, 2025
30c44bd
Misc fixes
haydenbleasel Jan 25, 2025
dafcb3f
Update tests
haydenbleasel Jan 25, 2025
c6f053a
Fix test expectations
haydenbleasel Jan 25, 2025
b40be45
Solve for Azure format requirements
haydenbleasel Jan 25, 2025
60a0248
Rework Google to use recognizer
haydenbleasel Jan 25, 2025
3700cc7
Update google.mdx
haydenbleasel Jan 25, 2025
4c99885
Finish docs
haydenbleasel Jan 25, 2025
bc293a7
Fix shadcn components
haydenbleasel Jan 25, 2025
e9aecbe
Build fixes
haydenbleasel Jan 25, 2025
7939b15
Add hover effect to providers
haydenbleasel Jan 25, 2025
6a16023
Improve website examples
haydenbleasel Jan 25, 2025
37fe798
Fix links
haydenbleasel Jan 25, 2025
5472091
Update metadata
haydenbleasel Jan 25, 2025
83af71b
Update docs
haydenbleasel Jan 25, 2025
c11fd93
Update metadata
haydenbleasel Jan 25, 2025
d3bf9e1
Update metadata.ts
haydenbleasel Jan 25, 2025
e28219a
Update metadata.ts
haydenbleasel Jan 25, 2025
7cb5805
Update page.tsx
haydenbleasel Jan 25, 2025
c066f82
Scaffold Gladia support
haydenbleasel Jan 25, 2025
02142a3
Add Gladia test
haydenbleasel Jan 25, 2025
c5db7b2
Update docs
haydenbleasel Jan 25, 2025
8c32615
Responsive fixes
haydenbleasel Jan 25, 2025
b3d6861
Light mode fixes
haydenbleasel Jan 25, 2025
4fe71e7
Update index.tsx
haydenbleasel Jan 25, 2025
e52b2ac
Create rev.ts
haydenbleasel Jan 25, 2025
2944e88
Create rev.test.ts
haydenbleasel Jan 25, 2025
5279b59
Add rev package
haydenbleasel Jan 25, 2025
800afd6
Update website
haydenbleasel Jan 25, 2025
dbdf5a5
Add murf
haydenbleasel Jan 26, 2025
9260d65
Create murf.test.ts
haydenbleasel Jan 26, 2025
cdf52a6
Add Murf docs
haydenbleasel Jan 26, 2025
142a1fe
Update index.tsx
haydenbleasel Jan 26, 2025
6726fb5
Add deepgram to website
haydenbleasel Jan 26, 2025
355c0be
Scaffold deepgram
haydenbleasel Jan 26, 2025
e850764
Update openai.test.ts
haydenbleasel Jan 26, 2025
4e9e419
Create deepgram.test.ts
haydenbleasel Jan 26, 2025
758bb48
Create deepgram.mdx
haydenbleasel Jan 26, 2025
0350d44
Split model from voice
haydenbleasel Jan 26, 2025
1c4ac59
Update deepgram.ts
haydenbleasel Jan 26, 2025
e69b4ff
Update meta.json
haydenbleasel Jan 26, 2025
f10c92d
Rework providers into marquee
haydenbleasel Jan 26, 2025
4cf82bb
Update page.tsx
haydenbleasel Jan 26, 2025
1c214d2
Add more example snippets
haydenbleasel Jan 26, 2025
29aff4f
Fix typos
haydenbleasel Jan 26, 2025
e0f59bd
Fix scrolling of snippet tabs
haydenbleasel Jan 26, 2025
c5898c4
Animate images
haydenbleasel Jan 26, 2025
8286f40
Scaffold a native interface
haydenbleasel Jan 26, 2025
ba0e428
Update ibm.test.ts
haydenbleasel Jan 26, 2025
ad3ee47
Add native docs
haydenbleasel Jan 26, 2025
186c3f0
Update meta.json
haydenbleasel Jan 26, 2025
161a31d
Update providers.mdx
haydenbleasel Jan 26, 2025
8781c59
Update native.mdx
haydenbleasel Jan 26, 2025
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
11 changes: 11 additions & 0 deletions .autorc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"plugins": [
"npm",
"first-time-contributor",
"released"
],
"owner": "haydenbleasel",
"repo": "orate",
"name": "Hayden Bleasel",
"email": "hello@haydenbleasel.com"
}
44 changes: 44 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Release

on:
push:
branches: [main]

jobs:
release:
runs-on: ubuntu-latest

if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"

steps:

- uses: actions/checkout@v4

- name: Prepare repository
run: git fetch --unshallow --tags

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9

- name: Cache pnpm modules
uses: actions/cache@v4
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-

- name: Create Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
pnpm install
npx auto shipit
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,7 @@ yarn-error.log*
dist/

# test
test.ts
test/*.wav
__tests__/output

# auto
.env
5 changes: 3 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,6 @@
},
"[typescriptreact]": {
"editor.defaultFormatter": "biomejs.biome"
}
}
},
"tailwindCSS.experimental.configFile": "./website/tailwind.config.ts"
}
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Orate

**The AI toolkit for speech.**

Create realistic, human-like speech and transcribe audio with a unified API that works with leading AI providers like OpenAI, ElevenLabs and AssemblyAI.

Install with `npm i orate` (or your favourite package manager).

Check out the [website](https://www.orate.dev) for more information.
11 changes: 11 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Security Policy

## Supported Versions

As this is an unofficial project, only the latest version is supported.

## Reporting a Vulnerability

If you find a vulnerability in this library, please open a GitHub issue with as much detail as possible.

If you find a vulnerability in the Corellium API, please get in touch on the [contact page](https://www.corellium.com/contact).
19 changes: 19 additions & 0 deletions __tests__/assembly.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { readFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { transcribe } from '../src';
import { assembly } from '../src/assembly';

describe('AssemblyAI Tests', () => {
it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: assembly.stt(),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
34 changes: 34 additions & 0 deletions __tests__/azure.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { readFile, writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak, transcribe } from '../src';
import { azure } from '../src/azure';

describe('Azure Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: azure.tts('en-US-AvaMultilingualNeural'),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/azure-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});

it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: azure.stt(),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
34 changes: 34 additions & 0 deletions __tests__/deepgram.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { readFile, writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak, transcribe } from '../src';
import { deepgram } from '../src/deepgram';

describe('Deepgram Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: deepgram.tts('aura', 'asteria-en'),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/deepgram-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});

it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: deepgram.stt('nova-2'),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
21 changes: 21 additions & 0 deletions __tests__/elevenlabs.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak } from '../src';
import { elevenlabs } from '../src/eleven-labs';

describe('ElevenLabs Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: elevenlabs.tts('multilingual_v2', 'aria'),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/eleven-labs-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});
});
19 changes: 19 additions & 0 deletions __tests__/gladia.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { readFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { transcribe } from '../src';
import { gladia } from '../src/gladia';

describe('Gladia Tests', () => {
it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: gladia.stt('enhanced'),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
34 changes: 34 additions & 0 deletions __tests__/google.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { readFile, writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak, transcribe } from '../src';
import { google } from '../src/google';

describe('Google Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: google.tts(),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/google-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});

it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: google.stt(process.env.GOOGLE_RECOGNIZER as string),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
34 changes: 34 additions & 0 deletions __tests__/ibm.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { readFile, writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak, transcribe } from '../src';
import { ibm } from '../src/ibm';

describe('IBM Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: ibm.tts(),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/ibm-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});

it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: ibm.stt(),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
21 changes: 21 additions & 0 deletions __tests__/murf.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak } from '../src';
import { murf } from '../src/murf';

describe('Murf Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: murf.tts(),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/murf-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});
});
34 changes: 34 additions & 0 deletions __tests__/openai.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import { readFile, writeFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { speak, transcribe } from '../src';
import { openai } from '../src/openai';

describe('OpenAI Tests', () => {
it('should convert text to speech', async () => {
const speech = await speak({
model: openai.tts('tts-1', 'alloy'),
prompt: 'Hello from Orate, the AI toolkit for speech.',
});

await writeFile(
'./__tests__/output/openai-speech.wav',
Buffer.from(await speech.arrayBuffer())
);

expect(speech).toBeInstanceOf(File);
expect(speech.size).toBeGreaterThan(0);
});

it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: openai.stt('whisper-1'),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
19 changes: 19 additions & 0 deletions __tests__/rev.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { readFile } from 'node:fs/promises';
import { describe, expect, it } from 'vitest';
import { transcribe } from '../src';
import { rev } from '../src/rev';

describe('Rev Tests', () => {
it('should convert speech to text', async () => {
const file = await readFile('./__tests__/test.mp3');
const audio = new File([file], 'test.mp3', { type: 'audio/mp3' });

const text = await transcribe({
model: rev.stt('machine'),
audio,
});

expect(typeof text).toBe('string');
expect(text.length).toBeGreaterThan(0);
});
});
Binary file added __tests__/test.mp3
Binary file not shown.
Loading