Preheat oven to Gas Mark 8/230°C/450°F. Gently press tofu between several layers of paper towels to remove excess water; set aside.
Warm a large nonstick frying pan over medium-high heat and add cooking spray, spices and salt; swirl frying pan to combine. Add onions and cook, stirring often, until onions are very wilted and browned, about 8 to 9 minutes.
Combine cauliflower and tofu in a large bowl. Pour onion mixture into bowl and coat with cooking spray; mix with a spoon to thoroughly coat. Spread mixture onto a baking sheet in an even layer. Roast, stirring 3 times, until cauliflower and tofu are golden brown and smell very fragrant, about 1 hour. Serve over rice.