In a large pot, dry roast the star anise, cloves, cinnamon stick, and coriander seeds over medium heat for 1–2 minutes. Stirring occasionally until fragrant, remove and set aside.
Char the halved onion and sliced ginger directly on a hot skillet until blackened and aromatic.
Add the toasted spices, charred onion, and ginger to the pot. Pour in the broth, fish sauce, and sugar, and bring to a boil. Reduce to low and let simmer for 45 minutes to 1 hour.
Prepare the rice noodles according to package instructions. Drain and set aside.
Slice the beef or chicken thinly (partially freezing it makes slicing easier). For raw meat, let the hot broth cook the thin slices in the bowl.
Strain the broth to remove spices, onion, and ginger. Keep warm over low heat.
In each serving bowl, add cooked rice noodles, then layer with sliced meat. Ladle hot broth over the noodles and meat, cooking the meat instantly.
Garnish with cilantro, Thai basil, green onions, bean sprouts, and a lime wedge. Serve with hoisin and Sriracha.