ILikeAI / AlwaysReddy

AlwaysReddy is a LLM voice assistant that is always just a hotkey away.
MIT License
670 stars 69 forks source link

Bus error: 10 #21

Closed bluevisor closed 6 months ago

bluevisor commented 7 months ago

Macbook Pro M1 Pro macOS 14.5 Beta (23F5059e) Python 3.11.5 Local LLM server using LM Studio 0.2.20, with Llama 3 8B Instruct

After following setup instructions, when run "python main.py", I get "Bus error: 10"

this is my config.py

## MAKE A COPY OF THIS CALLED config.py

### COMPLETIONS API SETTINGS  ###
# Just uncomment the ONE api you want to use

### LOCAL OPTIONS ###

## OLLAMA COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "ollama"
# COMPLETION_MODEL = "llama3"
# OLLAMA_API_BASE_URL = "http://localhost:11434" #This should be the defualt

## LM Studio COMPLETIONS API EXAMPLE ##
COMPLETIONS_API = "lm_studio" 
COMPLETION_MODEL = "local-model" # You dont need to update this
LM_STUDIO_API_BASE_URL = "http://localhost:1234/v1" #This should be the defualt

### Hosted APIS ###

## ANTHROPIC COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "anthropic" 
# COMPLETION_MODEL = "claude-3-sonnet-20240229" 

## TOGETHER COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "together"
# COMPLETION_MODEL = "meta-llama/Llama-3-8b-chat-hf" 

## OPENAI COMPLETIONS API EXAMPLE ##
# COMPLETIONS_API = "openai"
# COMPLETION_MODEL = "gpt-4-0125-preview"

### Transcription API Settings ###

## Whisper X local transcription API EXAMPLE ##
TRANSCRIPTION_API = "whisperx" #local transcription!
WHISPER_MODEL = "tiny" # (tiny, base, small, medium, large) Turn this up to "base" if the transcription is too bad
TRANSCRIPTION_LANGUAGE = "en" 
WHISPER_BATCH_SIZE = 16
WHISPER_MODEL_PATH = None # you can point this to an existing model or leave it set to none

### Transcription API Settings ###
# TRANSCRIPTION_API = "openai" # this will use the hosted openai api

### TTS SETTINGS ###
PIPER_VOICE_JSON="en_en_US_amy_medium_en_US-amy-medium.onnx.json" #These are located in the piper_voices folder
PIPER_VOICE_ONNX="en_US-amy-medium.onnx"
TTS_ENGINE="piper" # 'piper' or 'openai' piper is local and fast but openai is better sounding
OPENAI_VOICE = "nova"

### PROMPTS ###
ACTIVE_PROMPT = "default_prompt" #Right now there is only 1 prompt

### HOTKEYS ###
CANCEL_HOTKEY = 'ctrl + alt + x'
CLEAR_HISTORY_HOTKEY = 'ctrl + alt + f12'
RECORD_HOTKEY = 'ctrl + shift + space'

### MISC ###
HOTKEY_DELAY = 0.5
AUDIO_FILE_DIR = "audio_files"
MAX_TOKENS = 8000 #Max tokens allowed in memory at once
START_SEQ = "-CLIPSTART-" #the model is instructed to place any text for the clipboard between the start and end seq
END_SEQ = "-CLIPEND-" #the model is instructed to place any text for the clipboard between the start and end seq

### AUDIO SETTINGS ###
BASE_VOLUME = 1 
FS = 11025   
START_SOUND_VOLUME = 0.000003
END_SOUND_VOLUME = 0.000003
CANCEL_SOUND_VOLUME = 0.000009
MIN_RECORDING_DURATION = 0.3
MAX_RECORDING_DURATION= 600 # If you record for more than 10 minutes, the recording will stop automatically

and pip list

Package                                           Version
------------------------------------------------- -----------
aiohttp                                           3.9.5
aiosignal                                         1.3.1
alembic                                           1.13.1
annotated-types                                   0.6.0
anthropic                                         0.25.6
antlr4-python3-runtime                            4.9.3
anyio                                             4.3.0
asteroid-filterbanks                              0.4.0
attrs                                             23.2.0
audioread                                         3.0.1
av                                                11.0.0
certifi                                           2024.2.2
cffi                                              1.16.0
charset-normalizer                                3.3.2
click                                             8.1.7
clipboard                                         0.0.4
coloredlogs                                       15.0.1
colorlog                                          6.8.2
contourpy                                         1.2.1
ctranslate2                                       4.2.1
cycler                                            0.12.1
decorator                                         5.1.1
distro                                            1.9.0
docopt                                            0.6.2
einops                                            0.8.0
faster-whisper                                    1.0.0
filelock                                          3.13.4
flatbuffers                                       24.3.25
fonttools                                         4.51.0
frozenlist                                        1.4.1
fsspec                                            2024.3.1
h11                                               0.14.0
httpcore                                          1.0.5
httpx                                             0.27.0
huggingface-hub                                   0.22.2
humanfriendly                                     10.0
HyperPyYAML                                       1.2.2
idna                                              3.7
Jinja2                                            3.1.3
joblib                                            1.4.0
julius                                            0.2.7
keyboard                                          0.13.5
kiwisolver                                        1.4.5
lazy_loader                                       0.4
librosa                                           0.10.1
lightning                                         2.2.3
lightning-utilities                               0.11.2
llvmlite                                          0.42.0
Mako                                              1.3.3
markdown-it-py                                    3.0.0
MarkupSafe                                        2.1.5
matplotlib                                        3.8.4
mdurl                                             0.1.2
mpmath                                            1.3.0
msgpack                                           1.0.8
multidict                                         6.0.5
networkx                                          3.3
nltk                                              3.8.1
numba                                             0.59.1
numpy                                             1.26.4
omegaconf                                         2.3.0
onnxruntime                                       1.17.3
openai                                            1.23.6
optuna                                            3.6.1
packaging                                         24.0
pandas                                            2.2.2
pillow                                            10.3.0
pip                                               24.0
platformdirs                                      4.2.1
pooch                                             1.8.1
primePy                                           1.3
protobuf                                          5.26.1
pyannote.audio                                    3.1.1
pyannote.core                                     5.0.0
pyannote.database                                 5.1.0
pyannote.metrics                                  3.2.1
pyannote.pipeline                                 3.0.1
pycparser                                         2.22
pydantic                                          2.7.1
pydantic_core                                     2.18.2
pydub                                             0.25.1
Pygments                                          2.17.2
pyobjc                                            10.2
pyobjc-core                                       10.2
pyobjc-framework-Accessibility                    10.2
pyobjc-framework-Accounts                         10.2
pyobjc-framework-AddressBook                      10.2
pyobjc-framework-AdServices                       10.2
pyobjc-framework-AdSupport                        10.2
pyobjc-framework-AppleScriptKit                   10.2
pyobjc-framework-AppleScriptObjC                  10.2
pyobjc-framework-ApplicationServices              10.2
pyobjc-framework-AppTrackingTransparency          10.2
pyobjc-framework-AudioVideoBridging               10.2
pyobjc-framework-AuthenticationServices           10.2
pyobjc-framework-AutomaticAssessmentConfiguration 10.2
pyobjc-framework-Automator                        10.2
pyobjc-framework-AVFoundation                     10.2
pyobjc-framework-AVKit                            10.2
pyobjc-framework-AVRouting                        10.2
pyobjc-framework-BackgroundAssets                 10.2
pyobjc-framework-BrowserEngineKit                 10.2
pyobjc-framework-BusinessChat                     10.2
pyobjc-framework-CalendarStore                    10.2
pyobjc-framework-CallKit                          10.2
pyobjc-framework-CFNetwork                        10.2
pyobjc-framework-Cinematic                        10.2
pyobjc-framework-ClassKit                         10.2
pyobjc-framework-CloudKit                         10.2
pyobjc-framework-Cocoa                            10.2
pyobjc-framework-Collaboration                    10.2
pyobjc-framework-ColorSync                        10.2
pyobjc-framework-Contacts                         10.2
pyobjc-framework-ContactsUI                       10.2
pyobjc-framework-CoreAudio                        10.2
pyobjc-framework-CoreAudioKit                     10.2
pyobjc-framework-CoreBluetooth                    10.2
pyobjc-framework-CoreData                         10.2
pyobjc-framework-CoreHaptics                      10.2
pyobjc-framework-CoreLocation                     10.2
pyobjc-framework-CoreMedia                        10.2
pyobjc-framework-CoreMediaIO                      10.2
pyobjc-framework-CoreMIDI                         10.2
pyobjc-framework-CoreML                           10.2
pyobjc-framework-CoreMotion                       10.2
pyobjc-framework-CoreServices                     10.2
pyobjc-framework-CoreSpotlight                    10.2
pyobjc-framework-CoreText                         10.2
pyobjc-framework-CoreWLAN                         10.2
pyobjc-framework-CryptoTokenKit                   10.2
pyobjc-framework-DataDetection                    10.2
pyobjc-framework-DeviceCheck                      10.2
pyobjc-framework-DictionaryServices               10.2
pyobjc-framework-DiscRecording                    10.2
pyobjc-framework-DiscRecordingUI                  10.2
pyobjc-framework-DiskArbitration                  10.2
pyobjc-framework-DVDPlayback                      10.2
pyobjc-framework-EventKit                         10.2
pyobjc-framework-ExceptionHandling                10.2
pyobjc-framework-ExecutionPolicy                  10.2
pyobjc-framework-ExtensionKit                     10.2
pyobjc-framework-ExternalAccessory                10.2
pyobjc-framework-FileProvider                     10.2
pyobjc-framework-FileProviderUI                   10.2
pyobjc-framework-FinderSync                       10.2
pyobjc-framework-FSEvents                         10.2
pyobjc-framework-GameCenter                       10.2
pyobjc-framework-GameController                   10.2
pyobjc-framework-GameKit                          10.2
pyobjc-framework-GameplayKit                      10.2
pyobjc-framework-HealthKit                        10.2
pyobjc-framework-ImageCaptureCore                 10.2
pyobjc-framework-InputMethodKit                   10.2
pyobjc-framework-InstallerPlugins                 10.2
pyobjc-framework-InstantMessage                   10.2
pyobjc-framework-Intents                          10.2
pyobjc-framework-IntentsUI                        10.2
pyobjc-framework-IOBluetooth                      10.2
pyobjc-framework-IOBluetoothUI                    10.2
pyobjc-framework-IOSurface                        10.2
pyobjc-framework-iTunesLibrary                    10.2
pyobjc-framework-KernelManagement                 10.2
pyobjc-framework-LatentSemanticMapping            10.2
pyobjc-framework-LaunchServices                   10.2
pyobjc-framework-libdispatch                      10.2
pyobjc-framework-libxpc                           10.2
pyobjc-framework-LinkPresentation                 10.2
pyobjc-framework-LocalAuthentication              10.2
pyobjc-framework-LocalAuthenticationEmbeddedUI    10.2
pyobjc-framework-MailKit                          10.2
pyobjc-framework-MapKit                           10.2
pyobjc-framework-MediaAccessibility               10.2
pyobjc-framework-MediaLibrary                     10.2
pyobjc-framework-MediaPlayer                      10.2
pyobjc-framework-MediaToolbox                     10.2
pyobjc-framework-Metal                            10.2
pyobjc-framework-MetalFX                          10.2
pyobjc-framework-MetalKit                         10.2
pyobjc-framework-MetalPerformanceShaders          10.2
pyobjc-framework-MetalPerformanceShadersGraph     10.2
pyobjc-framework-MetricKit                        10.2
pyobjc-framework-MLCompute                        10.2
pyobjc-framework-ModelIO                          10.2
pyobjc-framework-MultipeerConnectivity            10.2
pyobjc-framework-NaturalLanguage                  10.2
pyobjc-framework-NetFS                            10.2
pyobjc-framework-Network                          10.2
pyobjc-framework-NetworkExtension                 10.2
pyobjc-framework-NotificationCenter               10.2
pyobjc-framework-OpenDirectory                    10.2
pyobjc-framework-OSAKit                           10.2
pyobjc-framework-OSLog                            10.2
pyobjc-framework-PassKit                          10.2
pyobjc-framework-PencilKit                        10.2
pyobjc-framework-PHASE                            10.2
pyobjc-framework-Photos                           10.2
pyobjc-framework-PhotosUI                         10.2
pyobjc-framework-PreferencePanes                  10.2
pyobjc-framework-PushKit                          10.2
pyobjc-framework-Quartz                           10.2
pyobjc-framework-QuickLookThumbnailing            10.2
pyobjc-framework-ReplayKit                        10.2
pyobjc-framework-SafariServices                   10.2
pyobjc-framework-SafetyKit                        10.2
pyobjc-framework-SceneKit                         10.2
pyobjc-framework-ScreenCaptureKit                 10.2
pyobjc-framework-ScreenSaver                      10.2
pyobjc-framework-ScreenTime                       10.2
pyobjc-framework-ScriptingBridge                  10.2
pyobjc-framework-SearchKit                        10.2
pyobjc-framework-Security                         10.2
pyobjc-framework-SecurityFoundation               10.2
pyobjc-framework-SecurityInterface                10.2
pyobjc-framework-SensitiveContentAnalysis         10.2
pyobjc-framework-ServiceManagement                10.2
pyobjc-framework-SharedWithYou                    10.2
pyobjc-framework-SharedWithYouCore                10.2
pyobjc-framework-ShazamKit                        10.2
pyobjc-framework-Social                           10.2
pyobjc-framework-SoundAnalysis                    10.2
pyobjc-framework-Speech                           10.2
pyobjc-framework-SpriteKit                        10.2
pyobjc-framework-StoreKit                         10.2
pyobjc-framework-Symbols                          10.2
pyobjc-framework-SyncServices                     10.2
pyobjc-framework-SystemConfiguration              10.2
pyobjc-framework-SystemExtensions                 10.2
pyobjc-framework-ThreadNetwork                    10.2
pyobjc-framework-UniformTypeIdentifiers           10.2
pyobjc-framework-UserNotifications                10.2
pyobjc-framework-UserNotificationsUI              10.2
pyobjc-framework-VideoSubscriberAccount           10.2
pyobjc-framework-VideoToolbox                     10.2
pyobjc-framework-Virtualization                   10.2
pyobjc-framework-Vision                           10.2
pyobjc-framework-WebKit                           10.2
pyparsing                                         3.1.2
pyperclip                                         1.8.2
python-dateutil                                   2.9.0.post0
python-dotenv                                     1.0.1
pytorch-lightning                                 2.2.3
pytorch-metric-learning                           2.5.0
pytz                                              2024.1
PyYAML                                            6.0.1
regex                                             2024.4.28
requests                                          2.31.0
rich                                              13.7.1
ruamel.yaml                                       0.18.6
ruamel.yaml.clib                                  0.2.8
safetensors                                       0.4.3
scikit-learn                                      1.4.2
scipy                                             1.13.0
semver                                            3.0.2
sentencepiece                                     0.2.0
setuptools                                        65.5.0
shellingham                                       1.5.4
six                                               1.16.0
sniffio                                           1.3.1
sortedcontainers                                  2.4.0
sounddevice                                       0.4.6
soundfile                                         0.12.1
soxr                                              0.3.7
speechbrain                                       1.0.0
SQLAlchemy                                        2.0.29
sympy                                             1.12
tabulate                                          0.9.0
tensorboardX                                      2.6.2.2
threadpoolctl                                     3.4.0
tiktoken                                          0.6.0
tokenizers                                        0.15.2
torch                                             2.3.0
torch-audiomentations                             0.11.1
torch-pitch-shift                                 1.2.4
torchaudio                                        2.3.0
torchmetrics                                      1.3.2
torchvision                                       0.18.0
tqdm                                              4.66.2
transformers                                      4.39.3
typer                                             0.12.3
typing_extensions                                 4.11.0
tzdata                                            2024.1
urllib3                                           2.2.1
whisperx                                          3.1.1
yarl                                              1.9.4
kaminoer commented 7 months ago

Can you share the full log trace, i.e., which line of code in which file caused this? This should be displayed in the terminal when you run into this issue.

ILikeAI commented 6 months ago

I should be adding verbose mode tomorrow, when it's merged try cloning the repo again, set verbose mode to true in the config file and run it again. This should give you a full error trace with more info

ILikeAI commented 6 months ago

It should be by merged this time tomorrow

ILikeAI commented 6 months ago

Just merged the changes!

bluevisor commented 6 months ago

I should be adding verbose mode tomorrow, when it's merged try cloning the repo again, set verbose mode to true in the config file and run it again. This should give you a full error trace with more info

Will do!

bluevisor commented 6 months ago

After updating the error is now gone.