File tree 1 file changed +17
-10
lines changed
1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -71,20 +71,29 @@ flowchart TB
71
71
Go(go)
72
72
Rust(rust)
73
73
end
74
- Go-->jetReader
75
- jetWriter-->Rust
76
- jetReader-->prompts
77
- prompts-->llm
74
+ Go-- 1. -- >jetReader
75
+ jetWriter-- 7. -- >Rust
76
+ jetReader-- 2. -- >prompts
77
+ prompts-- 3. -- >llm
78
78
llm-->ollama
79
- llm-->ttsChunks
80
- llm-->jetChunks
79
+ llm-- 4. -- >ttsChunks
80
+ llm-- 4. -- >jetChunks
81
81
jetChunks-->jetWriter
82
82
ttsChunks-->tts
83
- tts-->playht
84
- tts-->ttsDone
83
+ tts-- 5. -- >playht
84
+ tts-- 6. -- >ttsDone
85
85
ttsDone-->jetWriter
86
86
```
87
87
88
+ 1 . ` jet.Reader ` receives a message published on a JetStream subject
89
+ 2 . ` jet.Reader ` sends this message to the ` prompts ` channel
90
+ 3 . ` llm ` worker reads the messages sent to the ` prompts ` channel and forwards them to ollama for LLM generation
91
+ 4 . ollama generates the response and the ` llm ` worker sends it to both ` ttsChunks ` and ` jetChunks ` channels
92
+ 5 . ` tts ` worker reads the message and sends the message to PlayHT API and streams the audio to the default audio device;
93
+ 6 . once the playback has finished ` tts ` worker notifies ` jet.Writer ` via the ` ttsDone ` channel that it's done playing audio
94
+ 6 . ` jet.Writer ` receives the notification on the ` ttsDone ` channel and publishes the message it received on ` jetChunks ` channel
95
+ to a JetStream subject
96
+
88
97
# HOWTO
89
98
90
99
There are a few prerequisites:
@@ -169,5 +178,3 @@ Start the `rustbot`:
169
178
``` shell
170
179
cargo run --manifest-path rustbot/Cargo.toml
171
180
```
172
-
173
-
You can’t perform that action at this time.
0 commit comments