OpenInterpreter / 01

The open-source language model computer
http://openinterpreter.com/01
GNU Affero General Public License v3.0
4.77k stars 472 forks source link

M1 Piper Exec format error::OS "Darwin" and ARCH is "arm64" using v1.2.0/piper_arm64 #177

Closed DocCheese closed 3 months ago

DocCheese commented 3 months ago

Describe the bug Worked with community on Discord to allow for M1 with Arch arm64 to download v1.2.0/piper_arm64 version of piper since no arm64 support in latest version. (Details in PR here https://github.com/OpenInterpreter/01/pull/175)

However, this yields to the following new error:

{'role': 'user', 'type': 'message', 'content': ' Can you open up my 
chrome client?\n'}

{'role': 'assistant', 'type': 'message', 'content': '---\nSure!'}

Traceback (most recent call last):
  File "/Users/USERNAME/HK/01/software/source/server/server.py", line 280, in 
listener
    await stream_tts_to_device(sentence)
  File "/Users/USERNAME/HK/01/software/source/server/server.py", line 332, in 
stream_tts_to_device
    for chunk in stream_tts(sentence):
  File "/Users/USERNAME/HK/01/software/source/server/server.py", line 337, in 
stream_tts
    audio_file = tts(sentence)
                 ^^^^^^^^^^^^^
  File 
"/Users/USERNAME/HK/01/software/source/server/services/tts/piper/tts.py", line 
18, in tts
    subprocess.run([
  File 
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py
", line 548, in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File 
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py
", line 1024, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File 
"/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py
", line 1917, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
OSError: [Errno 8] Exec format error: '/Users/USERNAME/Library/Application 
Support/01/services/tts/piper/piper/piper'

  ────────────────────────────────────────────────────────────────────────────  
  Sure●  

Then the process to hangs. There seems to still be some element of configuration we're missing to get arm64 piper working.

To Reproduce Steps to reproduce the behavior:

  1. Follow https://github.com/OpenInterpreter/01/pull/175 or append 01/software/source/server/services/tts/piper/tts.py to allow for: ` if OS == "Darwin" and ARCH == "arm64":

    Adjusted macOS logic for arm64 architecture

            asset_url = "https://github.com/rhasspy/piper/releases/download/v1.2.0/piper_arm64.tar.gz"

    `

  2. poetry run 01 --local
  3. Activate and give voice input
  4. See error

Expected behavior Have local LLM message dictated by TTS and 01 to continue action.

Screenshots

Desktop (please complete the following information):

TashaSkyUp commented 3 months ago

I want to fix this but I'm kind of busy today dangit. @DocCheese I'm a little confused you're on the current main? we just had some changes merged.

dheavy commented 3 months ago

@DocCheese thanks for taking the time to describe this! I'm having trouble reproducing it given my setup, but I want to test some assumptions nonetheless.

First, can you tell me what model you are using and what tool (Ollama or LM Studio)? I'd like to maximize the chance to reproduce, if possible.

Then, would you mind testing the following and reporting on the outcome?

  1. Delete directory ~/Library/Application Support/01/services/tts/piper to remove the previously installed version and start fresh.
  2. Pull the main branch to incorporate fix from #175.
  3. Re-run poetry run 01 --local and report output here.

That would help us go forward in investigating.

tyfiero commented 3 months ago

I was not able to reproduce either, can you confirm that this is still an issue after pulling the latest changes?

TashaSkyUp commented 3 months ago

shot in the dark but this looks like to many pipers

OSError: [Errno 8] Exec format error: '/Users/USERNAME/Library/Application 
Support/01/services/tts/piper/piper/piper'
DocCheese commented 3 months ago

I was not able to reproduce either, can you confirm that this is still an issue after pulling the latest changes?

@DocCheese thanks for taking the time to describe this! I'm having trouble reproducing it given my setup, but I want to test some assumptions nonetheless.

First, can you tell me what model you are using and what tool (Ollama or LM Studio)? I'd like to maximize the chance to reproduce, if possible.

Then, would you mind testing the following and reporting on the outcome?

1. Delete directory `~/Library/Application Support/01/services/tts/piper` to remove the previously installed version and start fresh.

2. Pull the `main` branch to incorporate fix from [Fix UnboundLocalError for asset_url on Piper install (macOS) #175](https://github.com/OpenInterpreter/01/pull/175).

3. Re-run `poetry run 01 --local` and report output here.

That would help us go forward in investigating.

Fresh everything after pulling the latest changes at it seems to be working as intended now. Exploring different local LLMs / system prompts now.

Thanks for the support kind folks!