This is part of the Sixth Amendment to the Constitution, quoting: "In all criminal prosecutions, the accused shall enjoy the right to a speedy and public trial..."
Speedy Trial rights in Texas - With limited exceptions, a defendant should be brought to trial in Texas within the following time frames - unless waived by the defendant or the defendan'ts attorney:
...
What I believe you are looking for is the speedy trial act of 1974. See the link for details. States have additional requirements, for example Pennsylvania has rule 1100. Basically this states that...