Cook the green beans as you would normally - I'd suggest either steam them for a few minutes, boil or cook in the microwave with a little water. Whichever way, it will only take a couple minutes and you want them tender but only just so they don't become mushy and keep their nice green color. Drain and set aside.
While the beans are cooking, melt the butter in a small-medium skillet. Finely dice the onion and add it to the pan. Cook for a minute while you finely slice and dice the speck or bacon. Add the speck/bacon to the pan and cook for a couple minutes until it is starting to crisp. Add the cooked beans, cook a minute, stirring regularly, then serve.
Notes
Note - some people add a little vinegar, sugar and mustard along with the beans to add additional flavor. I'd suggest no more than around 1tbsp vinegar and sugar and 1tsp mustard, but maybe less. I don't think they are really needed but play around with the flavors to taste.