freddyaboulton HF Staff commited on
Commit
4eef939
·
verified ·
1 Parent(s): a4784a5

Create app.pyx

Browse files
Files changed (1) hide show
  1. app.pyx +8 -0
app.pyx ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from fastrtc import Stream, ReplyOnPause
2
+ from numpy import np
3
+
4
+ def echo(audio: tuple[int, np.ndarray]) -> tuple[int, np.ndarray]:
5
+ yield audio
6
+
7
+ stream = Stream(ReplyOnPause(echo), modality="audio", mode="send-receive")
8
+ stream.ui.launch()