Why do people lose their voices?
started scratchy and then could barely talk and now it is a whisper
It sounds like you are dealing with laryngitis, which is an inflammation of the vocal cords. There are two basic types of laryngitis. The first is laryngitis from an infection of the vocal cords. This is usually caused by a common viral infection, such as the common cold, and it typically will begin with a scratchy throat and then proceed to hoarseness as in your case. The second type of laryngitis is from mechanical strain of the vocal cords, and is most common in people who sing or otherwise use their voice for a living. Neither type of laryngitis is usually very serious, and most of the time all that is needed is a bit of rest before things return back to normal. However, it is never a bad idea to go see your primary care doctor about the issue. They can make sure that there is nothing more worrisome going on, such as a more serious infection requiring antibiotics. They can also prescribe medications to help associated symptoms such as cough and sore throat. Assuming your doctor doesn't find anything concerning on your exam, you should be starting to feel better and have return of your voice within a few more days.
This answer is for general informational purposes only and is not a substitute for professional medical advice.
If you think you may have a medical emergency, call your doctor or (in the United States) 911 immediately. Always seek the advice of your doctor before starting or changing treatment. Medical professionals who provide responses to health-related questions are intended third party beneficiaries with certain rights under Zocdoc’s Terms of Service.