会说话的骆驼
Talk-Llama

原始链接: https://github.com/ggerganov/whisper.cpp/tree/master/examples/talk-llama

简单来说,“talk-llama”是一个通过 C++ 编程语言构建的应用程序,它利用 Whisper 和基于 LLVM 的框架(称为 LLVM-LLGo)等开源技术,允许人类和人工智能 (AI) 之间进行无缝通信。 该软件专为对话目的而开发,将人类输入转换为文本输出,然后使用任何所需的文本转语音 (TTS) 引擎将其翻译回语音。 为了简化其可用性,该实用程序还通过会话管理功能提供对持续对话的支持。 对于进一步的定制选项,用户可以更改随附的“说话”脚本中提供的配置设置,以满足他们的特定需求。 该综合软件包适用于寻求改进的可访问性解决方案的个人或有兴趣将对话功能融入各种技术应用程序而不需要过多的技术知识或资源的人。

您的偏好和意见很重要,但最终选择取决于个人需求和个性。 有些人喜欢简约的界面,而另一些人则喜欢更丰富的视觉显示。 同样,一些用户可能会优先考虑简单性和易用性,而其他用户则看重先进的功能和创新的设计理念。 两种观点都有道理,具体取决于背景和优先事项。
相关文章

原文

{"payload":{"allShortcutsEnabled":false,"path":"examples/talk-llama","repo":{"id":541269386,"defaultBranch":"master","name":"whisper.cpp","ownerLogin":"ggerganov","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2022-09-25T18:26:37.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/1991296?v=4","public":true,"private":false,"isOrgOwned":false},"currentUser":null,"refInfo":{"name":"master","listCacheKey":"v0:1694506928.0","canEdit":false,"refType":"branch","currentOid":"d445098c8f0f182e9f3c48656ed9c7df20874c80"},"tree":{"items":[{"name":"prompts","path":"examples/talk-llama/prompts","contentType":"directory"},{"name":".gitignore","path":"examples/talk-llama/.gitignore","contentType":"file"},{"name":"CMakeLists.txt","path":"examples/talk-llama/CMakeLists.txt","contentType":"file"},{"name":"README.md","path":"examples/talk-llama/README.md","contentType":"file"},{"name":"eleven-labs.py","path":"examples/talk-llama/eleven-labs.py","contentType":"file"},{"name":"llama.cpp","path":"examples/talk-llama/llama.cpp","contentType":"file"},{"name":"llama.h","path":"examples/talk-llama/llama.h","contentType":"file"},{"name":"speak","path":"examples/talk-llama/speak","contentType":"file"},{"name":"speak.bat","path":"examples/talk-llama/speak.bat","contentType":"file"},{"name":"speak.ps1","path":"examples/talk-llama/speak.ps1","contentType":"file"},{"name":"talk-llama.cpp","path":"examples/talk-llama/talk-llama.cpp","contentType":"file"}],"templateDirectorySuggestionUrl":null,"readme":{"displayName":"README.md","richText":"

\n

Talk with an LLaMA AI in your terminal

\n

Latest perf as of 2 Nov 2023 using Whisper Medium + LLaMA v2 13B Q8_0 on M2 Ultra:

\n
\n \n \n \n\n talk-llama-1.mp4\n \n \n\n \n
\n\n

Previous demo running on CPUs

\n
\n \n \n \n\n talk-llama4-final-lq.mp4\n \n \n\n \n
\n\n\n

The talk-llama tool depends on SDL2 library to capture audio from the microphone. You can build it like this:

\n
# Install SDL2 on Linux\nsudo apt-get install libsdl2-dev\n\n# Install SDL2 on Mac OS\nbrew install sdl2\n\n# Build the \"talk-llama\" executable\nmake talk-llama\n\n# Run it\n./talk-llama -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p \"Georgi\" -t 8
\n
    \n
  • The -mw argument specifies the Whisper model that you would like to use. Recommended base or small for real-time experience
  • \n
  • The -ml argument specifies the LLaMA model that you would like to use. Read the instructions in https://github.com/ggerganov/llama.cpp for information about how to obtain a ggml compatible LLaMA model
  • \n
\n\n

The talk-llama tool supports session management to enable more coherent and continuous conversations. By maintaining context from previous interactions, it can better understand and respond to user requests in a more natural way.

\n

To enable session support, use the --session FILE command line option when running the program. The talk-llama model state will be saved to the specified file after each interaction. If the file does not exist, it will be created. If the file exists, the model state will be loaded from it, allowing you to resume a previous session.

\n

This feature is especially helpful for maintaining context in long conversations or when interacting with the AI assistant across multiple sessions. It ensures that the assistant remembers the previous interactions and can provide more relevant and contextual responses.

\n

Example usage:

\n
./talk-llama --session ./my-session-file -mw ./models/ggml-small.en.bin -ml ../llama.cpp/models/llama-13b/ggml-model-q4_0.gguf -p \"Georgi\" -t 8
\n\n

For best experience, this example needs a TTS tool to convert the generated text responses to voice.\nYou can use any TTS engine that you would like - simply edit the speak script to your needs.\nBy default, it is configured to use MacOS's say or Windows SpeechSynthesizer, but you can use whatever you wish.

\n\n

If you have any feedback, please let \"us\" know in the following discussion: #672

\n
","errorMessage":null,"headerInfo":{"toc":[{"level":1,"text":"talk-llama","anchor":"talk-llama","htmlText":"talk-llama"},{"level":2,"text":"Building","anchor":"building","htmlText":"Building"},{"level":2,"text":"Session","anchor":"session","htmlText":"Session"},{"level":2,"text":"TTS","anchor":"tts","htmlText":"TTS"},{"level":2,"text":"Discussion","anchor":"discussion","htmlText":"Discussion"}],"siteNavLoginPath":"/login?return_to=https%3A%2F%2Fgithub.com%2Fggerganov%2Fwhisper.cpp%2Ftree%2Fmaster%2Fexamples%2Ftalk-llama"}},"totalCount":11,"showBranchInfobar":false},"fileTree":{"examples":{"items":[{"name":"addon.node","path":"examples/addon.node","contentType":"directory"},{"name":"bench.wasm","path":"examples/bench.wasm","contentType":"directory"},{"name":"bench","path":"examples/bench","contentType":"directory"},{"name":"command.wasm","path":"examples/command.wasm","contentType":"directory"},{"name":"command","path":"examples/command","contentType":"directory"},{"name":"lsp","path":"examples/lsp","contentType":"directory"},{"name":"main","path":"examples/main","contentType":"directory"},{"name":"quantize","path":"examples/quantize","contentType":"directory"},{"name":"stream.wasm","path":"examples/stream.wasm","contentType":"directory"},{"name":"stream","path":"examples/stream","contentType":"directory"},{"name":"talk-llama","path":"examples/talk-llama","contentType":"directory"},{"name":"talk.wasm","path":"examples/talk.wasm","contentType":"directory"},{"name":"talk","path":"examples/talk","contentType":"directory"},{"name":"whisper.android","path":"examples/whisper.android","contentType":"directory"},{"name":"whisper.nvim","path":"examples/whisper.nvim","contentType":"directory"},{"name":"whisper.objc","path":"examples/whisper.objc","contentType":"directory"},{"name":"whisper.swiftui","path":"examples/whisper.swiftui","contentType":"directory"},{"name":"whisper.wasm","path":"examples/whisper.wasm","contentType":"directory"},{"name":"CMakeLists.txt","path":"examples/CMakeLists.txt","contentType":"file"},{"name":"common-ggml.cpp","path":"examples/common-ggml.cpp","contentType":"file"},{"name":"common-ggml.h","path":"examples/common-ggml.h","contentType":"file"},{"name":"common-sdl.cpp","path":"examples/common-sdl.cpp","contentType":"file"},{"name":"common-sdl.h","path":"examples/common-sdl.h","contentType":"file"},{"name":"common.cpp","path":"examples/common.cpp","contentType":"file"},{"name":"common.h","path":"examples/common.h","contentType":"file"},{"name":"dr_wav.h","path":"examples/dr_wav.h","contentType":"file"},{"name":"generate-karaoke.sh","path":"examples/generate-karaoke.sh","contentType":"file"},{"name":"helpers.js","path":"examples/helpers.js","contentType":"file"},{"name":"livestream.sh","path":"examples/livestream.sh","contentType":"file"},{"name":"twitch.sh","path":"examples/twitch.sh","contentType":"file"},{"name":"yt-wsp.sh","path":"examples/yt-wsp.sh","contentType":"file"}],"totalCount":31},"":{"items":[{"name":".devops","path":".devops","contentType":"directory"},{"name":".github","path":".github","contentType":"directory"},{"name":"bindings","path":"bindings","contentType":"directory"},{"name":"cmake","path":"cmake","contentType":"directory"},{"name":"coreml","path":"coreml","contentType":"directory"},{"name":"examples","path":"examples","contentType":"directory"},{"name":"extra","path":"extra","contentType":"directory"},{"name":"models","path":"models","contentType":"directory"},{"name":"openvino","path":"openvino","contentType":"directory"},{"name":"samples","path":"samples","contentType":"directory"},{"name":"tests","path":"tests","contentType":"directory"},{"name":".gitignore","path":".gitignore","contentType":"file"},{"name":".gitmodules","path":".gitmodules","contentType":"file"},{"name":"CMakeLists.txt","path":"CMakeLists.txt","contentType":"file"},{"name":"LICENSE","path":"LICENSE","contentType":"file"},{"name":"Makefile","path":"Makefile","contentType":"file"},{"name":"README.md","path":"README.md","contentType":"file"},{"name":"ggml-alloc.c","path":"ggml-alloc.c","contentType":"file"},{"name":"ggml-alloc.h","path":"ggml-alloc.h","contentType":"file"},{"name":"ggml-cuda.cu","path":"ggml-cuda.cu","contentType":"file"},{"name":"ggml-cuda.h","path":"ggml-cuda.h","contentType":"file"},{"name":"ggml-metal.h","path":"ggml-metal.h","contentType":"file"},{"name":"ggml-metal.m","path":"ggml-metal.m","contentType":"file"},{"name":"ggml-metal.metal","path":"ggml-metal.metal","contentType":"file"},{"name":"ggml-opencl.cpp","path":"ggml-opencl.cpp","contentType":"file"},{"name":"ggml-opencl.h","path":"ggml-opencl.h","contentType":"file"},{"name":"ggml.c","path":"ggml.c","contentType":"file"},{"name":"ggml.h","path":"ggml.h","contentType":"file"},{"name":"whisper.cpp","path":"whisper.cpp","contentType":"file"},{"name":"whisper.h","path":"whisper.h","contentType":"file"}],"totalCount":30}},"fileTreeProcessingTime":9.275398000000001,"foldersToFetch":[],"treeExpanded":true,"symbolsExpanded":false,"csrf_tokens":{"/ggerganov/whisper.cpp/branches":{"post":"yPUYSDLobspgPsS4hxJM1tXefqSDk1FnGGUTgRFaeoGS3RfA9brGJ_xN5RtYLE-nz5wHz9QjE5yRFu6OBxmQxg"},"/ggerganov/whisper.cpp/branches/fetch_and_merge/master":{"post":"TMUBrqa1DCx3Ox9M6CcE33M4Vg9qqMnWi_0OaaVC0jxonCsiHdyItWukgTNxf_1gv0cCe6F29g-luhbgRPcjaA"},"/ggerganov/whisper.cpp/branches/fetch_and_merge/master?discard_changes=true":{"post":"tQU2PEWHycZpKTLrZKD1FfJQBF9tgCtnYK0WiqRLXgORXByw_u5NX3W2rJT9-AyqPi9QK6ZeFL5O6g4DRf6vVw"}}},"title":"whisper.cpp/examples/talk-llama at master · ggerganov/whisper.cpp"}

联系我们 contact @ memedata.com