-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding translation example using VAD, OPUS, ArgoTranslate, and a pret…
…ty printer for better readibility
- Loading branch information
1 parent
d572bd6
commit 15f123a
Showing
31 changed files
with
696 additions
and
145 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Dora argo example | ||
|
||
Make sure to have, dora, pip and cargo installed. | ||
|
||
```bash | ||
# Install rerun if it's not done already | ||
dora up | ||
|
||
dora build dataflow_cn_terminal.yml | ||
dora start dataflow_cn_terminal.yml | ||
|
||
# In another terminal | ||
python pretty_print.py | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: chinese | ||
TRANSLATE: false | ||
|
||
- id: dora-argotranslate | ||
build: pip install -e ../../node-hub/dora-argotranslate | ||
path: dora-argotranslate | ||
inputs: | ||
text: | ||
source: dora-distil-whisper/text | ||
queue_size: 1 | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: zh | ||
TARGET_LANGUAGE: en | ||
|
||
- id: plot | ||
build: cargo build -p dora-rerun --release | ||
path: dora-rerun | ||
inputs: | ||
text: dora-argotranslate/text | ||
env: | ||
IMAGE_WIDTH: 640 | ||
IMAGE_HEIGHT: 480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: chinese | ||
TRANSLATE: false | ||
|
||
- id: dora-opus | ||
build: pip install -e ../../node-hub/dora-opus | ||
path: dora-opus | ||
inputs: | ||
text: dora-distil-whisper/text | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: zh | ||
TARGET_LANGUAGE: en | ||
|
||
- id: plot | ||
build: cargo build -p dora-rerun --release | ||
path: dora-rerun | ||
inputs: | ||
translated_text: dora-opus/text | ||
original_text: dora-distil-whisper/text | ||
env: | ||
IMAGE_WIDTH: 640 | ||
IMAGE_HEIGHT: 480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: chinese | ||
TRANSLATE: false | ||
|
||
- id: dora-opus | ||
build: pip install -e ../../node-hub/dora-opus | ||
path: dora-opus | ||
inputs: | ||
text: dora-distil-whisper/text | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: zh | ||
TARGET_LANGUAGE: en | ||
|
||
- id: pretty-print | ||
path: dynamic | ||
inputs: | ||
translated_text: dora-opus/text | ||
original_text: dora-distil-whisper/text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: english | ||
TRANSLATE: false | ||
|
||
- id: dora-argotranslate | ||
build: pip install -e ../../node-hub/dora-argotranslate | ||
path: dora-argotranslate | ||
inputs: | ||
text: dora-distil-whisper/text | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: en | ||
TARGET_LANGUAGE: zh | ||
|
||
- id: dora-rerun | ||
build: cargo build -p dora-rerun --release | ||
path: dora-rerun | ||
inputs: | ||
text: dora-argotranslate/text | ||
env: | ||
IMAGE_WIDTH: 640 | ||
IMAGE_HEIGHT: 480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: english | ||
TRANSLATE: false | ||
|
||
- id: dora-opus | ||
build: pip install -e ../../node-hub/dora-opus | ||
path: dora-opus | ||
inputs: | ||
text: dora-distil-whisper/text | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: en | ||
TARGET_LANGUAGE: zh | ||
|
||
- id: pretty-print | ||
path: dynamic | ||
inputs: | ||
translated_text: dora-opus/text | ||
original_text: dora-distil-whisper/text | ||
env: | ||
IMAGE_WIDTH: 640 | ||
IMAGE_HEIGHT: 480 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
nodes: | ||
- id: dora-microphone | ||
build: pip install -e ../../node-hub/dora-microphone | ||
path: dora-microphone | ||
outputs: | ||
- audio | ||
|
||
- id: dora-vad | ||
build: pip install -e ../../node-hub/dora-vad | ||
path: dora-vad | ||
inputs: | ||
audio: dora-microphone/audio | ||
outputs: | ||
- audio | ||
|
||
- id: dora-distil-whisper | ||
build: pip install -e ../../node-hub/dora-distil-whisper | ||
path: dora-distil-whisper | ||
inputs: | ||
input: dora-vad/audio | ||
outputs: | ||
- text | ||
env: | ||
TARGET_LANGUAGE: english | ||
TRANSLATE: false | ||
|
||
- id: dora-argotranslate | ||
build: pip install -e ../../node-hub/dora-argotranslate | ||
path: dora-argotranslate | ||
inputs: | ||
text: dora-distil-whisper/text | ||
outputs: | ||
- text | ||
env: | ||
SOURCE_LANGUAGE: en | ||
TARGET_LANGUAGE: zh | ||
|
||
- id: pretty-print | ||
build: cargo build -p dora-rerun --release | ||
path: dynamic | ||
inputs: | ||
translated_text: dora-argotranslate/text | ||
original_text: dora-distil-whisper/text | ||
env: | ||
IMAGE_WIDTH: 640 | ||
IMAGE_HEIGHT: 480 |
Oops, something went wrong.