Comments (25)
Great to hear that you made so much progress!
Will look into what you did with the ALSA issue and hopefully that works for me.
And yes, you should run sudo dmesg --follow > /var/log/dmesg &
each time you reboot the computer or exit the job. Could be automated but this should be a temporary fix as it is a security concern overall. Will create a new issue with my proposed code solution.
from 01.
I got a clean boot of 01OS! It responded in Arabic at first but then I told it not to and it fixed itself. Lol, a surprise. 🤯
Found a way to resolve the ALSA errors: #138 (comment)
Also, I realized that you don't have to run sudo dmesg --follow > /var/log/dmesg &
each time, just the existence of it works but it isn't getting updated because it stops in the background. I'll resolve this later and update this issue.
from 01.
same client error in wsl - clean ubuntu 22.04.3 and 3.11.5.
server running w/o problem.
from 01.
While I was initially facing the same issue on Raspberry Pi OS, I later switched to Ubuntu 23.10 and was able to get both the Server and Client running fine. Faced other ALSA errors but I was able to get past them and now I'm able to interface both ways.
from 01.
With a simple touch a fixed the issue:
sudo touch /var/log/dmesg
Well, now is only missing the ALSA issue.. I'm close..
from 01.
I am looking into the /var/log/dmesg
issue.
from 01.
@mysticaltech Could you please rename this issue in regard to accessing /var/log/dmesg
. Maybe "Accessing dmesg in Linux"?
from 01.
The issue here is that software\source\server\utils\kernel.py
function get_kernel_messages
is trying to access a file that doesn't exist. Unfortunately, similar logs like /var/log/syslog
and /var/log/kern.log
have access restrictions. This is a security concern.
To resolve this issue without any code changes run this command and change the access to the file:
sudo touch /var/log/dmesg
sudo chmod go+w /var/log/dmesg
sudo dmesg --follow > /var/log/dmesg &
from 01.
Ah, I see... sorry I just saw the dmesg thing becuase that was the error I was having. In regards to your other errors, I believe it has to do with your OS and Python version:
OS: Linux 6.7.9-200.fc39.x86_64 (Fedora 39 Gnome, wayland)
Python Version 3.11.8
Please see issue #219.
from 01.
Proposed PR solution:
- Test for the existence of binary
dmesg
- Pipe
dmesg
to/tmp/dmesg
- Return the path
/tmp/dmesg
to be used inget_kernel_messages
function orNone
Any input from team members would be appreciated.
from 01.
Also just for clarification, that needs to be run everytime before starting the server correct? sudo dmesg --follow > /var/log/dmesg &
from 01.
It's working for me now, not the mac experience yet, but it's working. Freezes sometimes, and does not seem to be able to do everything, but am sure it will improve with time. So closing this issue for now.
@rbrisita Thanks again for the unlock, really appreciate it.
from 01.
The best way to try and debug this IMHO is via setting up a Fedora VM, from any OS. Just use the default Fedora Workstation version, no changes, vanilla. You can get the images here: https://fedoraproject.org/workstation/download
You can use VirtualBox or other, the setup should be fast enough, less than third minutes to get going. https://www.virtualbox.org/
And my instructions to reproduce should be clear. I have included all steps.
from 01.
Thanks for sharing @akashkuttappa, so that issue seems more for non-Ubuntu, probably non-Debian based linux.
from 01.
i run success but i do not known how to talk to o1? where can i input text to chat it?
from 01.
I have a similar issue. I'm using Llama2 and running it locally with poetry run 01 --local
, and is detected my spacebar, but I have maybe a ALSA issue:
○
Starting...
▌ 01 is compatible with several local model providers.
[?] Which one would you like to use?:
> Ollama
LM Studio
1 Ollama model found. To download a new model, run ollama run <model-name>, then start a new 01 session.
For a full list of downloadable models, check out https://ollama.com/library
[?] Select a downloaded Ollama model:
> llama2
Using Ollama model: llama2
Exception in thread Thread-9:
Traceback (most recent call last):
File "/usr/lib/python3.9/threading.py", line 954, in _bootstrap_inner
self.run()
File "/usr/lib/python3.9/threading.py", line 892, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/avp/tmp/src/openia_01/software/source/server/server.py", line 413, in main
service_instance = ServiceClass(config)
File "/home/avp/tmp/src/openia_01/software/source/server/services/tts/piper/tts.py", line 13, in __init__
self.install(config["service_directory"])
File "/home/avp/tmp/src/openia_01/software/source/server/services/tts/piper/tts.py", line 64, in install
urllib.request.urlretrieve(asset_url, os.path.join(PIPER_FOLDER_PATH, PIPER_ASSETNAME))
UnboundLocalError: local variable 'asset_url' referenced before assignment
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
Recording started...
Recording stopped.
Recording started...
Recording stopped.
My OS:
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
from 01.
the "assert_url" issue was fixed with the PR #175 in my Debian, but now I have the next error:
Starting...
ALSA lib pcm_dsnoop.c:638:(snd_pcm_dsnoop_open) unable to open slave
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2660:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_usb_stream.c:486:(_snd_pcm_usb_stream_open) Invalid type for card
ALSA lib pcm_dmix.c:1075:(snd_pcm_dmix_open) unable to open slave
INFO: Started server process [2556990]
INFO: Waiting for application startup.
Task exception was never retrieved
future: <Task finished name='Task-6' coro=<put_kernel_messages_into_queue() done, defined at /home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py:63> exception=FileNotFoundError(2, 'No such file or directory')>
Traceback (most recent call last):
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 65, in put_kernel_messages_into_queue
text = check_filtered_kernel()
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 47, in check_filtered_kernel
messages = get_kernel_messages()
File "/home/avp/tmp/src/openia_01/software/source/server/utils/kernel.py", line 23, in get_kernel_messages
with open('/var/log/dmesg', 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/var/log/dmesg'
Ready.
INFO: Application startup complete.
from 01.
While I was initially facing the same issue on Raspberry Pi OS, I later switched to Ubuntu 23.10 and was able to get both the Server and Client running fine. Faced other ALSA errors but I was able to get past them and now I'm able to interface both ways.
How did you get past the ALSA issues?
from 01.
@rbrisita But it's not just this, there is an issue for both client and server.
Edit: Just did the rename
from 01.
To resolve this issue without any code changes run this command and change the access to the file:
sudo touch /var/log/dmesg sudo chmod go+w /var/log/dmesg sudo dmesg --follow > /var/log/dmesg &
Before the above, I also fixed my PATH env variable to pickup dmesg from the OS directly and not brew.
And the commands above did the trick! 🫡
from 01.
Thanks @rbrisita! So server fixed! Now for the client, please see my response on the other issue. The client still does not work even when using Xorg in place of Wayland, same error ModuleNotFoundError: No module named '01OS.clients.linux'
.
from 01.
@rbrisita Progress not perfection. So cloning the project directly, I have been able to get much farther after your above recommendations. Now it's an Alsa issue. Fedora uses pipewire, and Alsa is also installed, but does not seem to work.
03:23:47 in 01/software on main via 01os-O75aX4we-py3.10
➜ poetry run 01
○
Starting...
INFO: Started server process [28795]
INFO: Waiting for application startup.
Ready.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
ALSA lib dlmisc.c:339:(snd_dlobj_cache_get0) Cannot open shared library libasound_module_pcm_pipewire.so (/home/linuxbrew/.linuxbrew/Cellar/alsa-lib/1.2.11/lib/alsa-lib/libasound_module_pcm_pipewire.so: cannot open shared object file: No such file or directory)
INFO: ('127.0.0.1', 37364) - "WebSocket /" [accepted]
Hold the spacebar to start recording. Press CTRL-C to exit.INFO: connection open
Expression 'paInvalidSampleRate' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2050
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2721
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/hostapi/alsa/pa_linux_alsa.c', line: 2845
Exception in thread Thread-11 (record_audio):
Traceback (most recent call last):
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/home/linuxbrew/.linuxbrew/opt/[email protected]/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/home/karim/code/01/software/source/clients/base_device.py", line 157, in record_audio
stream = p.open(format=FORMAT, channels=CHANNELS, rate=RATE, input=True, frames_per_buffer=CHUNK)
File "/home/karim/.cache/pypoetry/virtualenvs/01os-O75aX4we-py3.10/lib/python3.10/site-packages/pyaudio/__init__.py", line 639, in open
stream = PyAudio.Stream(self, *args, **kwargs)
File "/home/karim/.cache/pypoetry/virtualenvs/01os-O75aX4we-py3.10/lib/python3.10/site-packages/pyaudio/__init__.py", line 441, in __init__
self._stream = pa.open(**arguments)
OSError: [Errno -9997] Invalid sample rate
from 01.
Ok, so I had alsa-lib installed via brew too. So removed that via brew uninstall alsa-lib gource openapi-generator openjdk openjdk@11 pulseaudio sdl2 sdl2_image
and it seems to be working way better now. Will play with it and confirm or deny soon.
03:35:28 in 01/software on main
➜ poetry run 01
○
Starting...
INFO: Started server process [132777]
INFO: Waiting for application startup.
Ready.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:10001 (Press CTRL+C to quit)
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.hdmi.0:CARD=0,AES0=4,AES1=130,AES2=0,AES3=2'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM hdmi
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.phoneline:CARD=0,DEV=0
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib confmisc.c:1377:(snd_func_refer) Unable to find definition 'cards.0.pcm.modem.0:CARD=0'
ALSA lib conf.c:5204:(_snd_config_evaluate) function snd_func_refer returned error: No such file or directory
ALSA lib conf.c:5727:(snd_config_expand) Evaluate error: No such file or directory
ALSA lib pcm.c:2721:(snd_pcm_open_noupdate) Unknown PCM phoneline
ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
INFO: ('127.0.0.1', 48382) - "WebSocket /" [accepted]
Hold the spacebar to start recording. Press CTRL-C to exit.
INFO: connection open
Recording started...
Recording stopped.
Recording started...
Recording stopped.
audio/wav /tmp/input_20240405033602788720.wav /tmp/output_20240405033602788879.wav
> Test one two test one
I'm here and ready to assist! How can I help you today?
Let me know what you'd like to do next.
Recording started...
Recording stopped.
audio/wav /tmp/input_20240405033628071344.wav /tmp/output_20240405033628071920.wav
> okay please I would like to open a browser with Google loaded
Sure, let me open it for you.
computer.browser.open("https://www.google.com")
from 01.
Ok, so getting better. I can talk, some errors some time, but it seems to be working more or less. Note that, I needed to use:
sudo dnf install python3.10 python3.10-devel python3.10-tkinter
poetry env use /usr/bin/python3.10
The only thing, is that now I cannot open a browser, it gives me the following:
AttributeError Traceback (most recent call last)
Cell In[49], line 2
1 print('##active_line1##')
----> 2 computer.browser.visit('https://www.google.com')
AttributeError: 'Browser' object has no attribute 'visit'
Any ideas on how to fix this?
from 01.
Created this PR #239.
from 01.
Related Issues (20)
- JSONDecodeError when attempting to get data from the web HOT 1
- while running zero one in Ubuntu Linux, getting error given HOT 3
- Asyncio Queue Bug
- GPT-4 change to GPT 3.5 Turbo as a default model HOT 2
- ngrok and connection to 01-Light HOT 2
- `CancelledError` Exception on Boot
- How to run with Humane AI Pin ? HOT 1
- Question about audio format for websocket HOT 1
- Task Persistence and Integrations
- "Let me know what you'd like to do next" repeats after answering the question and doesnt stop HOT 6
- Runs infinitely on local mode HOT 4
- I am the last step to add groq llm to 01 .. But I tried to fix this lot. I don't know how to fix this.
- Inconsistent Model Specification Behavior
- How to change openai's apikey settings HOT 2
- Ive tried for the last day to run this on M5 cardputer I cannot seem to figure it out
- Litellm/01 is unable to connect to non-openAI providers. HOT 12
- I'm not getting any response after recording.
- error: failed to run custom build command for whisper-rs-sys v0.8.0
- Can't clone repo HOT 2
- 01os installation: HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 01.