I would suggest something similar to what we did with my son when he would talk on and on in class every time he tried to answer even the simpliest teacher question: a hand signal. We used this at home, as well, when he was talking well past our ability to listen. Everyone in her circle (teachers, family, friends) would have the same signal and it should be discussed as a friendly way to let her know when she is talking to herself in a manner that is bothering someone near her. By using a quiet hand signal, you don't interrupt her train of thought and you give her time to adjust in her own way.
Make sure people don't over-use it, however. At home and in most situations she should be free to just be who she is. When it is important for her to reign it in, that is when those who care about her try the signal.
_________________
Mom to an amazing young adult AS son, plus an also amazing non-AS daughter. Most likely part of the "Broader Autism Phenotype" (some traits).