This works with copper, probably OK with brass -
Clamp one end in a firmly fixed vice.
Clamp the other end in a chuck.
Stretch the wire tight, put several turns in the wire by rotating the chuck.
Heating should anneal unwanted hardness out before stretching. Stretching and twisting it should re-harden and stiffen it into its new straight shape.