Skip to content

Commit 8e6d336

Browse files
authored
transcribe and translate audio file (#73)
* transcribe and translate audio file * transcriptions * add audiofile * readme update
1 parent ac83021 commit 8e6d336

File tree

15 files changed

+2600
-1
lines changed

15 files changed

+2600
-1
lines changed

audio-transcript/.env.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
OPENAI_API_KEY=your-openai-api-key

audio-transcript/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Overview
2+
3+
This example showcases how transcribe an audio file and then translate text to a target language. You can use any mp3 file you have at your disposal to test the example. Update the filePath value at `scheduleWorkflow.ts`. A test.mp3 file is already provided and will be one used if you execute scheduleWorkflow.ts
4+
5+
# Requirements
6+
7+
- Node 20 or higher
8+
9+
```bash
10+
brew install nvm
11+
nvm use 20
12+
```
13+
14+
# Install Restack Web UI
15+
16+
To install the Restack Web UI, you can use Docker.
17+
18+
```bash
19+
docker run -d --pull always --name restack -p 5233:5233 -p 6233:6233 -p 7233:7233 ghcr.io/restackio/restack:main
20+
```
21+
22+
# Start services
23+
24+
Where all your code is defined, including workflow steps.
25+
26+
add OPENAI_API_KEY in .env
27+
28+
```bash
29+
npm i
30+
npm run dev
31+
```
32+
33+
Your code will be running and syncing with Restack engine to execute workflows or functions.
34+
35+
# Schedule workflow to send email
36+
37+
In another shell:
38+
39+
```bash
40+
npm run schedule
41+
```
42+
43+
Will schedule to start example workflow immediately. The code for this is on `scheduleWorkflow.ts`. In here you can see how the transcribeAndTranslateWorkflow is scheduled to be executed.

0 commit comments

Comments
 (0)