For the cake or cupcakes:
Preheat the oven to 325° F for cake or 375° F for cupcakes. Grease the bottom of a 10-inch tube or bundt pan, or line two cupcake pans with a total of 20 paper liners. Have all ingredients at room temperature. Beat flour and butter together for five minutes. Add eggs one at a time, beating after each addition. Add sugar, baking powder, salt and vanilla and almond extracts. Beat for two minutes more.
For a cake, bake for about one hour, checking after fifty minutes. For cupcakes, bake for 20-25 minutes. Cool in pan for 10 minutes and then completely on a rack before frosting.
For the frosting:
When ready to frost cake or cupcakes, heat chocolate in a double-boiler or in the microwave in bursts until just melted. Stir until smooth, then stir in sour cream and salt. Spread onto completely cooled cake or cupcakes and top with sprinkles or other decorations if you like. Frosting will set over time.