From 111f597de53d42cb8761d727328d0efd95645a24 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 3 May 2024 15:08:19 +0100 Subject: [PATCH 1/2] fix: correced mac fn calls --- text-to-mic.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/text-to-mic.py b/text-to-mic.py index f917646..0b53290 100644 --- a/text-to-mic.py +++ b/text-to-mic.py @@ -259,14 +259,14 @@ https://www.scorchsoft.com/blog/text-to-mic-for-meetings/ app_support_path.mkdir(parents=True, exist_ok=True) # Ensure directory exists return app_support_path - def save_api_key_mac(api_key): - env_path = get_app_support_path() / '.env' + def save_api_key_mac(self, api_key): + env_path = self.get_app_support_path_mac() / '.env' with open(env_path, 'w') as f: f.write(f"OPENAI_API_KEY={api_key}\n") # Consider manually loading this .env file into your environment as needed - def load_api_key_mac(): - env_path = get_app_support_path() / '.env' + def load_api_key_mac(self): + env_path = self.get_app_support_path_mac() / '.env' if env_path.exists(): with open(env_path, 'r') as f: for line in f: From f2f916b8671c79540cb66050b5018f98f904f6c3 Mon Sep 17 00:00:00 2001 From: Luke Smith Date: Fri, 3 May 2024 15:08:51 +0100 Subject: [PATCH 2/2] chore: updated readme with mac install steps --- Readme.md | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Readme.md b/Readme.md index 446dded..bd6b3cb 100644 --- a/Readme.md +++ b/Readme.md @@ -68,9 +68,14 @@ To get this script working you will need to install the following on the relevan ### Mac * brew install portaudio -* pip install python-dotenv -* pip install wave -* pip install pydub +* brew install python-tk +* python3 -m venv ~/code/scorchsoft/text-to-mic-feed +* source ~/code/scorchsoft/text-to-mic-feed/bin/activate +* pip3 install python-dotenv +* pip3 install pyaudio +* pip3 install openai +* pip3 install wave +* pip3 install pydub # Making an installer