Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Whisper.net x LLamaSharp examples for Speech Chat #656

Merged
merged 9 commits into from
Apr 8, 2024

Conversation

Lyrcaxis
Copy link
Contributor

@Lyrcaxis Lyrcaxis commented Apr 7, 2024

Added whisper.net usage example & usage in combination with LlamaSharp.

Note that while the example is named 'Speech Chat', it actually uses non-instruct prompting. Let me know any thoughts!

Also, I added a note on where to download the models from, even when Whisper.net allows auto-download functionality.
This could be embedded by downloading the 150mb base model and copying it to build, but it's up to you to decide.

Videos:

LlamaSharp-Speech.Chat.mp4
LlamaSharp-Audio.Model.Prompt.mp4

@Lyrcaxis Lyrcaxis changed the title Added Whisper.net x LLamaSharp examples for Speech Detection and Speech Chat Added Whisper.net x LLamaSharp examples for Speech Chat Apr 7, 2024
Copy link
Collaborator

@AsakusaRinne AsakusaRinne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall looks great except of some minor issues. Thanks a lot for your contribution!

In addition to the comments, could you please print a brief description of this example when the user runs it? For example, This example shows how to recognize the voice and then get response from LLM. It uses whisper.net and models could be found in....... To use it, please open your microphone and speak to it, then......

LLama.Examples/ExampleRunner.cs Outdated Show resolved Hide resolved
LLama.Examples/Examples/SpeechTranscription.cs Outdated Show resolved Hide resolved
LLama.Examples/Examples/SpeechTranscription.cs Outdated Show resolved Hide resolved
@Lyrcaxis Lyrcaxis requested a review from AsakusaRinne April 8, 2024 14:38
@AsakusaRinne
Copy link
Collaborator

Merging this PR now, thank you for the contribution!

@AsakusaRinne AsakusaRinne merged commit c749139 into SciSharp:master Apr 8, 2024
3 checks passed
@Lyrcaxis Lyrcaxis deleted the speech-to-text-example branch April 8, 2024 15:45
@Mrgaton
Copy link

Mrgaton commented May 18, 2024

I love you, but where do i donwload the llama models a auto model downloader would be extremely usefoul and nice

@Lyrcaxis
Copy link
Contributor Author

I love you, but where do i donwload the llama models a auto model downloader would be extremely usefoul and nice

@Mrgaton Thanks :) You mean the quantized language models? Those could be obtained from huggingface.

You can either download a prequantized model (GGUF) or provide a non-quantized version (FP32, FP16, BF16) and convert it to GGUF via the llama.cpp library: https://github.com/ggerganov/llama.cpp/blob/master/convert.py

Here are some GGUF quants for LLaMA3-8B-Instruct: https://huggingface.co/bartowski/Meta-Llama-3-8B-Instruct-GGUF

@Mrgaton
Copy link

Mrgaton commented May 19, 2024

I managed to found a quantized llama3 8b model but is horrible is worse than gpt 3.5

@Mrgaton
Copy link

Mrgaton commented May 19, 2024

Also extremely slow cause I don't know why it's not using my gpu

@Lyrcaxis
Copy link
Contributor Author

@Mrgaton Well, gpt-3.5 is better than any released open source models atm :p You've set the bar too high.
As for the GPU thing, you can join LLamaSharp's discord and figure it out with other people! https://discord.gg/F5wRCNAQ

@AsakusaRinne
Copy link
Collaborator

I love you, but where do i donwload the llama models a auto model downloader would be extremely usefoul and nice

The model downloading feature is on the way now. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants