Dies ist der Hauptcode, den ich für mein endgültiges Projekt im College < /p>
verwendeimport asyncio
from dotenv import load_dotenv
from livekit.agents import AutoSubscribe, JobContext, WorkerOptions, cli, llm
from livekit.agents.voice_assistant import VoiceAssistant
from livekit.plugins import openai, silero
from api import AssistantFnc
load_dotenv()
async def entrypoint(ctx: JobContext):
initial_ctx = llm.ChatContext().append(
role="system",
text=(
"You are a voice assistant created by LiveKit. Your interface with users will be voice. "
"You should use short and concise responses, and avoiding usage of unpronouncable punctuation."
),
)
await ctx.connect(auto_subscribe=AutoSubscribe.AUDIO_ONLY)
fnc_ctx = AssistantFnc()
assitant = VoiceAssistant(
vad=silero.VAD.load(),
stt=openai.STT(),
llm=openai.LLM(),
tts=openai.TTS(),
chat_ctx=initial_ctx,
fnc_ctx=fnc_ctx,
)
assitant.start(ctx.room)
await asyncio.sleep(1)
await assitant.say("Hey, how can I help you today!", allow_interruptions=True)
if __name__ == "__main__":
cli.run_app(WorkerOptions(entrypoint_fnc=entrypoint))
< /code>
Dies ist der Fehler, den ich < /p>
erhalteerror: subprocess-exited-with-error
× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [21 lines of output]
Traceback (most recent call last):
File "C:\Users\Haziq\Desktop\fyp\LiveKit-AI-Voice-Assitant\ai\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in
main()
~~~~^^
File "C:\Users\Haziq\Desktop\fyp\LiveKit-AI-Voice-Assitant\ai\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Haziq\Desktop\fyp\LiveKit-AI-Voice-Assitant\ai\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users\Haziq\AppData\Local\Temp\pip-build-env-tbubv9cq\overlay\Lib\site-packages\setuptools\build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Haziq\AppData\Local\Temp\pip-build-env-tbubv9cq\overlay\Lib\site-packages\setuptools\build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "C:\Users\Haziq\AppData\Local\Temp\pip-build-env-tbubv9cq\overlay\Lib\site-packages\setuptools\build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "", line 33, in
File "", line 27, in get_version
KeyError: '__version__'
[end of output]
< /code>
Ich habe versucht, sowohl PIP- als auch PIP3 -Installationshandbuch zu verwenden, aber ich habe es immer noch nicht behoben, ich habe OpenAI und den LiveKit -Agenten bereits installiert. Ich habe auch versucht, die Lösung zu durchsuchen, fand aber nichts damit zu tun.
Ich habe ein Problem mit der Installation von LiveKit -Plugins OpenAI in Visual Code Studio ⇐ Python
-
- Similar Topics
- Replies
- Views
- Last post