From bd3df36417c336eda81e34206b5b20c5484d65f8 Mon Sep 17 00:00:00 2001
From: killian <63927363+KillianLucas@users.noreply.github.com>
Date: Sat, 27 Apr 2024 12:24:21 -0700
Subject: [PATCH 1/3] Credit to Kolja for voice interface development
---
README.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/README.md b/README.md
index a95c808..24b1fa7 100644
--- a/README.md
+++ b/README.md
@@ -51,6 +51,8 @@ poetry run 01 # Runs the 01 Light simulator (hold your spacebar, speak, release)
+**The [RealtimeTTS](https://github.com/KoljaB/RealtimeTTS) and [RealtimeSTT](https://github.com/KoljaB/RealtimeSTT) libraries in the incoming 01-rewrite are thanks to the state-of-the-art voice interface work of [Kolja Beigel](https://github.com/KoljaB). Please star those repos and consider contributing to / utilizing those projects!**
+
# Hardware
- The **01 Light** is an ESP32-based voice interface. Build instructions are [here](https://github.com/OpenInterpreter/01/tree/main/hardware/light). A list of what to buy [here](https://github.com/OpenInterpreter/01/blob/main/hardware/light/BOM.md).
From 11ed12d218286e6974ac7de497865e12352f34f4 Mon Sep 17 00:00:00 2001
From: killian <63927363+KillianLucas@users.noreply.github.com>
Date: Sat, 27 Apr 2024 12:28:32 -0700
Subject: [PATCH 2/3] Update README.md
---
README.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 24b1fa7..2686f74 100644
--- a/README.md
+++ b/README.md
@@ -19,7 +19,7 @@ We want to help you build. [Apply for 1-on-1 support.](https://0ggfznkwh4j.typef
> [!IMPORTANT]
> This experimental project is under rapid development and lacks basic safeguards. Until a stable `1.0` release, only run this repository on devices without sensitive information or access to paid services.
>
-> **A substantial rewrite to address these concerns and more is occurring [here](https://github.com/KillianLucas/01-rewrite/tree/main).**
+> **A substantial rewrite to address these concerns and more, including the addition of [RealtimeTTS](https://github.com/KoljaB/RealtimeTTS) and [RealtimeSTT](https://github.com/KoljaB/RealtimeSTT), is occurring [here](https://github.com/KillianLucas/01-rewrite/tree/main).**
From 4ecb84d6a2940449f77081f0efb64fa112f249b3 Mon Sep 17 00:00:00 2001
From: Ty Fiero
Date: Fri, 3 May 2024 08:12:29 -0700
Subject: [PATCH 3/3] Fix for local mode
---
software/source/server/services/tts/piper/tts.py | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/software/source/server/services/tts/piper/tts.py b/software/source/server/services/tts/piper/tts.py
index 8daa158..bd40441 100644
--- a/software/source/server/services/tts/piper/tts.py
+++ b/software/source/server/services/tts/piper/tts.py
@@ -12,7 +12,7 @@ class Tts:
self.piper_directory = ""
self.install(config["service_directory"])
- def tts(self, text):
+ def tts(self, text, mobile):
with tempfile.NamedTemporaryFile(suffix=".wav", delete=False) as temp_file:
output_file = temp_file.name
piper_dir = self.piper_directory
@@ -34,10 +34,16 @@ class Tts:
)
# TODO: hack to format audio correctly for device
- outfile = tempfile.gettempdir() + "/" + "raw.dat"
- ffmpeg.input(temp_file.name).output(
- outfile, f="s16le", ar="16000", ac="1", loglevel="panic"
- ).run()
+ if mobile:
+ outfile = tempfile.gettempdir() + "/" + "output.wav"
+ ffmpeg.input(temp_file.name).output(
+ outfile, f="wav", ar="16000", ac="1", loglevel="panic"
+ ).run()
+ else:
+ outfile = tempfile.gettempdir() + "/" + "raw.dat"
+ ffmpeg.input(temp_file.name).output(
+ outfile, f="s16le", ar="16000", ac="1", loglevel="panic"
+ ).run()
return outfile