Code Monkey home page Code Monkey logo

Comments (3)

Mic92 avatar Mic92 commented on July 30, 2024

I currently played with llama.cpp:

$ ./examples/alpaca.sh
> User prompt: Turn on the light; Available actions: TurnLightOn, TurnLightOff
TurnLightOn
> Available actions: TurnLightOn, TurnLightOff; User prompt: Toggle the light
TurnLightOn 
TurnLightOff
> Available actions: TurnLightOn(name), TurnLightOff(name); User prompt: Toggle the bathroom light    
TurnLightOn("Bathroom")

I can see how this could work :)

from rhasspy3.

Mic92 avatar Mic92 commented on July 30, 2024

vicuna seems to perform better:

Below is an instruction that describes a user request. Respond with one of the following categories: 

- FindMyPhone
- TurnLightOn
- TurnLightOff
- UnknownAction
User prompt: Make me a sandwhich
UnknownAction

from rhasspy3.

mmccool avatar mmccool commented on July 30, 2024

This is expected, since Kaldi matches to a particular expected set of sentences and Whisper transcription does not. However, a few things I've noticed:

  1. Be careful with wording. "Turn on my office light" does not work, "Turn on the office light" does. It might be possible to make the intent templates in Home Assistant more general to deal with variants like this.
  2. Watch out for homophones and near homophones. Whisper consistently misunderstands "hall light" as "whole light" with my accent, for some reason (weirdly, only when I try to turn it off, turning it on works fine...). If I try to very carefully pronounce it I may get "haul light" which also fails... In the long run, adding alias names for entities in Home Assistant (for example) may work around this.
  3. Transcription may produce spelling or punctuation variants that may not match your entity names. Ones I have run into are "WeatherFlow" turning into "weather flow" and "multisensor" being output by Whisper as "multi-sensor", both leading to a failure. Generally, naming entities around corporate names and other non-standard vocabulary will probably cause trouble. Again, setting up appropriate entity aliases may help here.

In the long run we just need a better system for converting transcriptions to intents. Well... LLMs were designed originally to translate languages. So what might work here is an LLM specifically trained to convert "general" transcriptions into the much smaller set of intents understood by a system. Note that small LLMs can run on lower-end hardware, even just using CPU (see gpt4all for a very cool demo). Of course this would add latency. But what's ALSO interesting is that Whisper includes a language model itself, and it might be possible to fine-tune it (e.g. with a LoRA model, which can be done relatively cheaply) to directly target Home Assistant intents (and maybe a set of non-standard-English corporate device names), which would avoid the latency issue.

Something simpler might also work, i.e. an intent recognition system that can find "near matches".

BTW1 it would be really nice if the medium model for Whisper were available with the download script. From what I've read it's a big step up from the small model in terms of transcription accuracy. Unfortunately, I'm too lazy to generate it myself :)

BTW2 this is a very cool project, thank you for working on it! I do hope integration with Home Assistant voice assistants improves, in particular I run Rhasspy (and other expensive AI things, like Frigate) on a different system (a larger Intel machine...) than where I run Home Assistant (a Rasp Pi HA Yellow) and I want to keep that distributed architecture.

from rhasspy3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.