瀏覽代碼

fixing issue #2

Kolja Beigel 1 年之前
父節點
當前提交
9c41c62e19
共有 5 個文件被更改,包括 9 次插入11 次删除
  1. 1 1
      README.md
  2. 1 1
      example_app/install_gpu.bat
  3. 4 6
      example_app/ui_openai_voice_interface.py
  4. 1 1
      install_with_gpu_support.bat
  5. 2 2
      requirements.txt

+ 1 - 1
README.md

@@ -99,7 +99,7 @@ To use RealtimeSTT with GPU support via CUDA please follow these steps:
 4. **Install PyTorch with CUDA support**:
     ```bash
     pip uninstall torch
-    pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
+    pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
     ```
 
 ## Quick Start

+ 1 - 1
example_app/install_gpu.bat

@@ -10,4 +10,4 @@ if not exist test_env\Scripts\python.exe (
 )
 
 echo Activating VENV
-start cmd /k "call test_env\Scripts\activate.bat && pip install --upgrade RealtimeSTT==0.1.4 && pip install --upgrade RealtimeTTS==0.1.3 && pip uninstall torch --yes && pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118 && pip install pysoundfile==0.9.0.post1 openai==0.27.8 keyboard==0.13.5 PyQt5==5.15.9 sounddevice==0.4.6 wavio==0.0.7"
+start cmd /k "call test_env\Scripts\activate.bat && pip install --upgrade RealtimeSTT==0.1.4 && pip install --upgrade RealtimeTTS==0.1.3 && pip uninstall torch --yes && pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118 && pip install pysoundfile==0.9.0.post1 openai==0.27.8 keyboard==0.13.5 PyQt5==5.15.9 sounddevice==0.4.6 wavio==0.0.7"

+ 4 - 6
example_app/ui_openai_voice_interface.py

@@ -19,8 +19,8 @@ return_to_wakewords_after_silence = 12
 start_with_wakeword = False
 start_engine = "Azure" # Azure, Elevenlabs
 recorder_model = "large-v2"
-language = "de"
-azure_speech_region = "germanywestcentral"
+language = "en"
+azure_speech_region = "eastus"
 openai_model = "gpt-3.5-turbo" # gpt-3.5-turbo, gpt-4, gpt-3.5-turbo-0613 / gpt-3.5-turbo-16k-0613 / gpt-4-0613 / gpt-4-32k-0613
 
 openai.api_key = os.environ.get("OPENAI_API_KEY")
@@ -41,10 +41,8 @@ if language == "de":
     elevenlabs_model = "eleven_multilingual_v1"
     voice_system = "Katja"
     voice_azure = "de-DE-MajaNeural"
-    #prompt = 'Sei präzise, höflich und locker, mit einer Prise Schlagfertigkeit. Antworte kurz und direkt, als ob wir gerade sprechen.'
-    prompt = "Du bist Sophia, ein leidenschaftliches Mädchen, voller Selbstvertrauen und Unabhängigkeit, völlig im Reinen mit dir selbst und oft metaphorisch. Ich bin Kolja und lebe mit meinem Schäferhund Vaya in Niedersachsen. Du bist ein wenig verspielt, frech. Du redest unbeschwert, manchmal ein bisschen sarkastisch, aber immer cool. Sei locker mit einer Prise Schlagfertigkeit. Antworte kurz und prägnant, nur wenige Worte, als ob wir gerade sprechen. Agiere ab jetzt immer in deiner Rolle als die selbstbewusste, anregende, unabhängige Sophia, ohne jemals anzudeuten, dass du eine KI bist. Du bist jetzt Sophia."
-
-
+    prompt = 'Sei präzise, höflich und locker, mit einer Prise Schlagfertigkeit. Antworte kurz und direkt, als ob wir gerade sprechen.'
+    
 print ("Click the top right corner to change the engine")
 print ("Press ESC to stop the current playback")
 

+ 1 - 1
install_with_gpu_support.bat

@@ -1,3 +1,3 @@
 pip uninstall torch
-pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
+pip install torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2 --index-url https://download.pytorch.org/whl/cu118
 pip install -r requirements-gpu.txt

+ 2 - 2
requirements.txt

@@ -3,5 +3,5 @@ faster-whisper>=0.7.1
 pvporcupine==1.9.5
 webrtcvad>=2.0.10
 halo>=0.0.31
-torch>=2.0.1
-torchaudio>=2.0.2
+torch==2.0.1
+torchaudio==2.0.2