From d3ac0a3d33fc38fa260a309fd99492fb9e7092ed Mon Sep 17 00:00:00 2001 From: haixuantao Date: Mon, 6 Jan 2025 14:28:21 +0100 Subject: [PATCH] Improve `README` and create 2 dataflow, one for dev and one for full remote version --- examples/speech-to-text/README.md | 25 +- .../{dataflow.yml => whisper-dev.yml} | 0 examples/speech-to-text/whisper.yml | 33 + examples/vlm/{dataflow.yml => qwenvl-dev.yml} | 0 examples/vlm/qwenvl.yml | 1968 +++++++++++++++++ examples/vlm/vision_only.yml | 41 - 6 files changed, 2024 insertions(+), 43 deletions(-) rename examples/speech-to-text/{dataflow.yml => whisper-dev.yml} (100%) create mode 100644 examples/speech-to-text/whisper.yml rename examples/vlm/{dataflow.yml => qwenvl-dev.yml} (100%) create mode 100755 examples/vlm/qwenvl.yml delete mode 100644 examples/vlm/vision_only.yml diff --git a/examples/speech-to-text/README.md b/examples/speech-to-text/README.md index ffe7ca53..c8ef9109 100644 --- a/examples/speech-to-text/README.md +++ b/examples/speech-to-text/README.md @@ -3,8 +3,29 @@ Make sure to have, dora, pip and cargo installed. ```bash -dora build dataflow.yml -dora run dataflow.yml +dora build whisper.yml +dora run whisper.yml # Wait for the whisper model to download which can takes a bit of time. ``` + +## Graph Visualization + +```mermaid + +flowchart TB + dora-microphone + dora-vad + dora-distil-whisper + dora-rerun[/dora-rerun\] +subgraph ___dora___ [dora] + subgraph ___timer_timer___ [timer] + dora/timer/secs/2[\secs/2/] + end +end + dora/timer/secs/2 -- tick --> dora-microphone + dora-microphone -- audio --> dora-vad + dora-vad -- audio as input --> dora-distil-whisper + dora-distil-whisper -- text as original_text --> dora-rerun + +``` diff --git a/examples/speech-to-text/dataflow.yml b/examples/speech-to-text/whisper-dev.yml similarity index 100% rename from examples/speech-to-text/dataflow.yml rename to examples/speech-to-text/whisper-dev.yml diff --git a/examples/speech-to-text/whisper.yml b/examples/speech-to-text/whisper.yml new file mode 100644 index 00000000..479d495f --- /dev/null +++ b/examples/speech-to-text/whisper.yml @@ -0,0 +1,33 @@ +nodes: + - id: dora-microphone + description: Microphone + build: pip install dora-microphone + path: dora-microphone + inputs: + tick: dora/timer/millis/2000 + outputs: + - audio + + - id: dora-vad + build: pip install dora-vad + path: dora-vad + inputs: + audio: dora-microphone/audio + outputs: + - audio + + - id: dora-whisper + build: pip install dora-whisper + path: dora-whisper + inputs: + input: dora-vad/audio + outputs: + - text + env: + TARGET_LANGUAGE: english + + - id: dora-rerun + build: pip install dora-rerun + path: dora-rerun + inputs: + original_text: dora-whisper/text diff --git a/examples/vlm/dataflow.yml b/examples/vlm/qwenvl-dev.yml similarity index 100% rename from examples/vlm/dataflow.yml rename to examples/vlm/qwenvl-dev.yml diff --git a/examples/vlm/qwenvl.yml b/examples/vlm/qwenvl.yml new file mode 100755 index 00000000..0889ef54 --- /dev/null +++ b/examples/vlm/qwenvl.yml @@ -0,0 +1,1968 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + File not found · GitHub + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ Skip to content + + + + + + + + + + + + +
+
+ + + + + + + + + + + + + + +
+ +
+ + + + + + + + +
+ + + + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + +
+ +
+ +
+ +
+ + + + / + + dora + + + Public +
+ + +
+ +
+ + +
+
+ +
+
+ + + + +
+ + + + + + +
+ + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+ +
+
+ +
+ +
+

Footer

+ + + + +
+
+ + + + + © 2025 GitHub, Inc. + +
+ + +
+
+ + + + + + + + + + + + + + + + + + + +
+ +
+
+ + + diff --git a/examples/vlm/vision_only.yml b/examples/vlm/vision_only.yml deleted file mode 100644 index 6c933a2f..00000000 --- a/examples/vlm/vision_only.yml +++ /dev/null @@ -1,41 +0,0 @@ -nodes: - - id: camera - build: pip install -e ../../node-hub/opencv-video-capture - path: opencv-video-capture - inputs: - tick: dora/timer/millis/50 - outputs: - - image - env: - CAPTURE_PATH: 0 - IMAGE_WIDTH: 640 - IMAGE_HEIGHT: 480 - - - id: dora-qwenvl - build: pip install -e ../../node-hub/dora-qwenvl - path: dora-qwenvl - inputs: - image: - source: camera/image - queue_size: 1 - tick: dora/timer/millis/400 - outputs: - - text - - tick - env: - DEFAULT_QUESTION: Describe the image in a very short sentence. - # USE_MODELSCOPE_HUB: true - - - id: plot - build: cargo build -p dora-rerun --release - path: dora-rerun - inputs: - image: - source: camera/image - queue_size: 1 - text: dora-qwenvl/tick - env: - IMAGE_WIDTH: 640 - IMAGE_HEIGHT: 480 - README: | - # Visualization of QwenVL2