Hi OP,
Speed is a slang term and can refer to any number of drugs. Using the proper chemical name or any other non ambiguous terminology will help people help you.
As for your questions we can't know what you took nor does it seem can you (and this is a key factor in determining how long it will last). Your best bet is to treat it like any other high dose of stimulants and attempt to stay calm, keep hydrated, and eat something if you can. If you have taken them before you can try some benzos to bring you down a little. The only real cure is to wait until they are out of your system though.
In addition if you think you need medical assistance you should seek it out.
I don't think there is any other way we are really going to be able to help you, but I will leave this open for the time being in case you have another other relevant questions, can clarify what it is you took, or to let us know you are okay.
Good Luck!