Heat a small skillet and toast the whole spices until fragrant. Let cool and then grind them in a coffee/spice grinder.
Add the ground spices to a food processor along with the ingredients for the Spice Paste. Pulse until ground to a coarse mixture.
In a stock pot, heat about 2 tablespoons of oil in a small skillet and fry the spice paste for 2-3 minutes. Add the chicken broth and chicken pieces, bring to a boil, reduce the heat, cover and simmer for one hour.
Remove the chicken pieces, remove the chicken from the bones and shred the chicken. Set aside. Pour the broth through a sieve, discarding the pulp from the spice paste, and return the broth to the pot. Return the shredded chicken to the pot along with the potatoes, carrots and salt. Return to a boil, reduce the heat, cover and simmer for another 25-30 minutes. Squeeze the lime juice in the soup just before serving.
Dish the hot soup into bowls topped with some bean sprouts, cilantro and slices of red chili pepper.