Skip to content

Commit 41ef18d

Browse files
committed
Add live translation demo
1 parent ceeb52e commit 41ef18d

47 files changed

Lines changed: 6377 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

live-translation/.env.example

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Your Fishjam app ID, available at https://fishjam.io/app/
2+
VITE_FISHJAM_ID=your_fishjam_id
3+
4+
# Optional: override the Media over QUIC relay URL.
5+
# Defaults to https://moq.fishjam.work/public when unset.
6+
# VITE_MOQ_URL=https://moq.fishjam.work/public

live-translation/.gitignore

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Dependencies
2+
node_modules
3+
4+
# Build output
5+
dist
6+
dist-ssr
7+
*.local
8+
9+
# Environment
10+
.env
11+
12+
# Yarn (Corepack fetches the version pinned in package.json)
13+
.yarn
14+
15+
# Logs
16+
logs
17+
*.log
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*
21+
22+
# Editor / OS
23+
.idea
24+
.vscode/*
25+
!.vscode/extensions.json
26+
.DS_Store
27+
*.suo
28+
*.sw?

live-translation/.yarnrc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
nodeLinker: node-modules

live-translation/README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Live Translation
2+
3+
Live streaming with real-time AI translation — powered by [Fishjam](https://fishjam.io),
4+
Gemini, and [Media over QUIC](https://moq.dev). A publisher broadcasts their camera and
5+
microphone, and viewers can watch the stream with AI-generated audio translation in the
6+
language of their choice.
7+
8+
## Getting Started
9+
10+
1. Copy `.env.example` to `.env` and fill in your Fishjam app ID:
11+
12+
```bash
13+
cp .env.example .env
14+
```
15+
16+
You can obtain `VITE_FISHJAM_ID` by visiting https://fishjam.io/app/.
17+
18+
2. Install dependencies:
19+
20+
```bash
21+
yarn
22+
```
23+
24+
3. Start the development server:
25+
26+
```bash
27+
yarn dev
28+
```
29+
30+
4. Open the printed local URL. The home page is the publisher; share the `watch/<name>`
31+
link with viewers to let them watch and pick a translation track.
32+
33+
## Environment Variables
34+
35+
| Variable | Required | Description |
36+
| ------------------ | -------- | --------------------------------------------------------------------------- |
37+
| `VITE_FISHJAM_ID` | Yes | Your Fishjam app ID, from https://fishjam.io/app/. |
38+
| `VITE_MOQ_URL` | No | Override the Media over QUIC relay URL. Defaults to the built-in public relay. |

live-translation/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!doctype html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8" />
5+
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
6+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7+
<title>Fishjam Live Translation</title>
8+
<link rel="preconnect" href="https://fonts.googleapis.com" />
9+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
10+
<link
11+
href="https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
12+
rel="stylesheet" />
13+
</head>
14+
<body>
15+
<div id="root"></div>
16+
<script type="module" src="/src/main.tsx"></script>
17+
</body>
18+
</html>

live-translation/package.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "live-translation",
3+
"private": true,
4+
"version": "0.27.0",
5+
"type": "module",
6+
"scripts": {
7+
"dev": "vite",
8+
"build": "tsc --noEmit && vite build",
9+
"preview": "vite preview"
10+
},
11+
"dependencies": {
12+
"@fishjam-cloud/react-client": "^0.27.0",
13+
"@moq/publish": "0.2.11",
14+
"@moq/signals": "^0.1.7",
15+
"@moq/watch": "0.2.14",
16+
"@radix-ui/react-icons": "^1.3.2",
17+
"@radix-ui/react-label": "^2.1.0",
18+
"@radix-ui/react-select": "^2.1.4",
19+
"@radix-ui/react-slot": "^1.1.1",
20+
"@svta/cml-utils": "1.4.0",
21+
"class-variance-authority": "^0.7.0",
22+
"clsx": "^2.1.1",
23+
"lucide-react": "^0.476.0",
24+
"next-themes": "^0.4.4",
25+
"qrcode.react": "^4.2.0",
26+
"react": "^19.0.0",
27+
"react-dom": "^19.0.0",
28+
"react-router": "^7.1.5",
29+
"sonner": "^2.0.3",
30+
"tailwind-merge": "^3.0.2",
31+
"tailwindcss-animate": "^1.0.7"
32+
},
33+
"devDependencies": {
34+
"@types/node": "^22.12.0",
35+
"@types/react": "^19.0.8",
36+
"@types/react-dom": "^19.0.3",
37+
"@vitejs/plugin-react-swc": "^3.7.2",
38+
"autoprefixer": "^10.4.20",
39+
"postcss": "^8.5.1",
40+
"tailwindcss": "^3.4.17",
41+
"typescript": "^5.7.3",
42+
"vite": "^6.0.11"
43+
},
44+
"packageManager": "yarn@4.6.0"
45+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
module.exports = {
2+
plugins: {
3+
tailwindcss: {},
4+
autoprefixer: {},
5+
},
6+
};

live-translation/public/avatar.svg

Lines changed: 7 additions & 0 deletions
Loading
Lines changed: 5 additions & 0 deletions
Loading
Lines changed: 10 additions & 0 deletions
Loading

0 commit comments

Comments
 (0)