Add butter, powdered sugar, salt, vanilla extract, and almond extract to the bowl of a large food processor. Process until smooth (about eight 1-second pulses). Add flour and pulse until mixture looks crumbly and chunky (about six 1-second pulses). Add sprinkles and quickly pulse several more times, until the sprinkles are just evenly incorporated.
Turn the dough out onto a large piece of wax paper and form the crumbles into a log that's about 14 inches long. Shape the log so that it has three flat sides, giving the ends a triangular shape (the log should look like a long triangular prism).
Wrap the triangular log with the wax paper. Take a wooden ruler (or another long, thin object) and press an indentation into one flat side of the log. Round the edges of that side to form a heart-shaped log. Place the wrapped cookie dough on a baking sheet and freeze for 15 minutes. Fine-tune the shape of the heart (if necessary) and freeze for 2 to 3 more hours or until solid.
Place rack in center position of oven. Preheat oven to 350°F. Line two baking sheets with parchment paper. Remove log of dough from the freezer. Allow the cookie dough to come to room temperature for 5 minutes or until just soft enough that it doesn't crack or crumble when sliced. Using a sharp knife, cut the log into slices that are approximately ⅜-inch thick. Arrange cookies an inch apart on the prepared baking sheets. Bake until cookies just barely turn a light golden color around the edges, between 12 and 15 minutes. Allow to cool on the baking sheets.
If your dough is too frozen, the cookies will crumble when you slice them. So allow your dough to sit at room temperature for 5 to 10 minutes before cutting. It should slice cleanly without crumbling but still maintain its heart cookie shape.
You may use any long, thin, hard object to make your indentation, but a ruler works great.