My current problems using NR / TTS solution do you use / boost NR performance :) AiO ;)

Dear friends,

two years a ago I began to try different ways for using voice commands to control Node Red.
My goal was to keep things local. So I used mostly stuff from @ johanneskropf DeepSpeech -> Coqui. But with the update to NR V3 some flows stopped working and beside that it has never been a good solution. Coqui is great but the model for German just sucks. It has no wake word and workarounds didn t work so well.
[ - Any ideas on that where I am not forced to call "Alexa" "Google". I really hate that wake-words.]
So I removed it but with my growing number of IoT devices in my home things are getting slower. My Family is not amused to wait for the NR Dashboard ~10 seconds to be loaded for switching the light or so. Thanx to JavaScript and its single threaded being I don t expect that things speed up in the future from software side. Currently I do use a Raspberry Pi 4 4GB running at 2GHz OC. And thinking about to upgrade to x86 to speed things up.
[Are there any benchmarks / experiences for my propose that prove I will get faster with a i5 Gen 6 NUC or so ?]
Thanx to our "nice" Government we suffer from four times higher energy costs in germany compared to 2021. So I can not buy a power machine sucking much energy.
Until now I did not really find a good way to solve my problems. Maybe you have ideas on that ?
Thx in advanced!

What device are you running the browser on?

I tested on differente devices (PCs / Android phones) and different browsers (most webkit) like brave, chrome, opera, firefox, edge.... on a PC its a little faster maybe 8-9 seconds while on a midrange Android it takes even 11 - 13 seconds.
I cloned my SD-Card and disabled 95% of the flows, run it on a Raspberry 3B 1GB and its much much faster. So its my massive use of node red that slows it down.

How many pages are in your dashboard?
Are you using charts?
Are you sending fast frequent messages to dashboard (sub 1 second)
Are you sending large payloads to dashboard (images, video etc?

  • I separated to pages as good as I can and don t think a single page it overloaded with elements.

  • Charts are carefully (very less data points) used and not saved. So when I restart node red all charts are empty. - On exzessive use of charts it should then load faster if charts are the a problem. - But it does not or just minor.

  • I do send a counter (light is burning for xxx seconds) to a gauge node. But only in case of switches and if there is a counter and not a permanent switch state. I tested that and the result was: If there is not a counter -> gauge node counting or if there are 10 at the same page time makes no or minor difference. Beside that this counter - thing does only affect two pages calling other pages without that gauge element does go a little faster may be 2 seconds for pages where only very less elements are present.

  • I do send ffmpeg (web cam) streams to a node from kevinGodell. I know to be careful with sending big data through node red and kept it like the flow in the examples. This was my last implementation and if many ffmpeg - streams are running it costs me about 1-2 seconds of loading time.
    Maybe I could optimize here a bit because when leaving the camera - page the ffmpeg process keeps running. I do not know how to trigger an event on leaving a page. Maybe you an idea on that?

Dashboard is an SPA (single page application). What that means under the hood is it is actually one huge application (with bits hidden/shown on demand)

I suspect a combination of everything you mention attributes to the slow loading. On top of that, ffmpeg will definitely have additional impact.

1 Like

ok, so I can not do much about it... just reduce stuff or maybe get an faster PC with more single core speed than the raspberry Pi 4, I guess ?

I'm certain there will be optimisations. For example,

  • make sure FFMPEG is stopped when not being viewed,
  • consider moving image processing to a different PI
  • dont push image data through node-red (e.g. supply video feed from a different server to an iFrame in a tab)
  • rewrite the dashboard in a standard web pages (extreme but has the most rewards)
1 Like

If you wanted to keep with speech recognition and also keep it local, have you tried Rhasspy ? Rhasspy may work with your current setup and I have no idea if it'll be lighter on resources - did check and it does support German. I played with an earlier version and it worked quite well, does use a wake word though (customisable)


1 Like
  • How can I get an event when leaving the tap with webcam views ?
  • I use iFames where ever I can. some cams do not support it so I have to use RTSP protocol == ffmpeg
  • Using a second machine leads me to the question: Wouldn´t it get better if I move to a x86 machine with a much higher single performance than the Raspberry Pi 4 ?
  • No no ... I don´t want to rewrite the web pages :slight_smile:

Thanx! That looks promising. I will take a deeper look and hope there is german language available!

Just FYI, open AI just released an open source library Whisper, it is local and multilingual. Repo.
Very easy to use, not sure how well this would perform on a raspberry though. Demo

1 Like

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.