Get started with this code:
from fastrtc import Stream, ReplyOnPause
def generate_audio(audio: tuple[int, np.ndarray]):
for chunk in generate_audio(audio):
yield (sample_rate, chunk)
stream = Stream(
modality="audio",
mode="send-receive",
handler=ReplyOnPause(response),
)
stream.fastphone()
This prints out the following:
"Call +1 877-713-4471 and input code 4582 when prompted"