This sets the speed to 1.125.
But any rate will do: 0.69, 4.20, 6.666.
Doesn't matter.
It's kinda obvious that it will throw an error if there is not at least one element on the page with the classnames 'video-stream html5-main-video', but nevermind.
I then added this snippet into a browser-bookmark i can click anytime i'm watching a yt video and want to set the speed.
I use a plugin called Video Speed Controller, it‘s probably my most used browser extension. You can configure hotkeys as well, which makes it very convenient. I use Q/E for -0.5/+0.5 and A/D for -0.1/+0.1 so I can finetune the playback to my liking with just couple keypresses.
There's also a small window in the top left of the video showing the current speed, which you can toggle by pressing V.