
963 S.W.2d 932 (1998)
Harry RILEY, Appellant,
v.
The STATE of Texas, Appellee.
No. 03-96-00621-CR.
Court of Appeals of Texas, Austin.
February 26, 1998.
Ian Inglis, Erik S. Goodman, Austin, for appellant.
Ronald Earle, Dist. Atty., C. Bryan Case, Jr., Asst. Dist. Atty., Austin, for state.
Before CARROLL, C.J., and KIDD and DALLY, JJ.[*]
*933 CARL E.F. DALLY, Justice (Assigned).
Appellant Harry Riley appeals from his conviction of the offense of aggravated sexual assault of a child. See Tex. Penal Code Ann. § 22.021(a)(1)(B)(i) (West Supp.1998). After the jury found appellant guilty, he waived his right to jury-assessed punishment and entered into a punishment agreement with the State. The agreement was that the State would recommend to the trial judge that the judge assess appellant's punishment at imprisonment for fifteen and one-half years if appellant waived his right to appeal. The trial court followed the State's recommendation and assessed appellant's punishment at fifteen and one-half years and pronounced sentence. After sentence was imposed, appellant filed a written waiver of his right to appeal. However, without obtaining permission from the trial court, appellant filed notice of appeal.
Appellant presents two points of error in which he urges that the trial court erred in overruling his motion for a new trial contending that his waivers of jury-assessed punishment and the right of appeal were involuntary. We do not have jurisdiction of this appeal and will dismiss it because we hold appellant voluntarily waived his right to appeal and gave notice of appeal without permission of the trial court.
A defendant may waive many of his rights including the right to appeal. See Faulder v. Hill, 612 S.W.2d 512, 514 (Tex. Crim.App.1980); Smith v. State, 858 S.W.2d 609, 611 (Tex.App.-Amarillo 1993, pet. ref'd). See also Tex.Code Crim. Proc. Ann. art. 1.14(a) (West Supp.1998). A knowing and intelligent waiver of the right to appeal made after sentence is imposed will prevent a defendant from appealing without the consent of the trial court. See Ex Parte Tabor, 565 S.W.2d 945, 946 (Tex.Crim.App.1978); Smith, 858 S.W.2d at 611. A trial court's refusal to consent to a defendant's appeal is affirmatively evidenced by the court's overruling of a motion for new trial in which the defendant has raised the voluntariness of his waiver. See Smith, 858 S.W.2d at 611.
After the jury's verdict was received, appellant orally advised the trial court that he wanted to waive his right to jury-assessed punishment and to waive his right to appeal. Appellant also filed a written waiver of jury-assessed punishment, which he signed and which was approved by appellant's counsel, State's counsel, and the trial court. The trial court admonished appellant that the range of punishment for the offense of which he had been convicted was imprisonment from five to ninety-nine years. The trial court carefully advised appellant concerning his waiver. Appellant told the court he had consulted with his trial counsel and with his wife and that he knew the consequences of waiving jury-assessed punishment and his right to appeal.
After the court pronounced appellant's sentence, appellant filed a written waiver of his right to appeal. He acknowledged that he had been sentenced and that after consulting with his counsel concerning his right to appeal, he waived that right. Appellant's trial counsel attested that he had consulted with and advised appellant concerning his right to appeal and believed appellant was voluntarily, knowingly, and intelligently waiving his right to appeal.
The trial court certified that:
It clearly appearing to the Court that the defendant is sane and is represented by competent counsel and the defendant understands the consequences of waiving his right to appeal, and that he voluntarily, knowingly, and intelligently waiver[ed] such right after having had said rights explained to him, the Court finds that such waiver of his right to appeal to be voluntarily made and accepts the defendant's waiver of his right to appeal.
Nothing in the record indicates that appellant's waiver of the right of appeal was not voluntary until that claim was made in appellant's amended motion for a new trial.
In his amended motion for new trial, for the first time, appellant alleges that his waivers of appeal and jury-assessed punishment were involuntary and not made knowingly and intentionally. Appellant claims *934 that at the time he waived his rights he was suffering dementia and was under the influence of a psychotropic medication. In support of the motion, appellant offered the testimony of Alan Colby, a psychiatrist. In Colby's opinion appellant had "a form of dementia probably Alzheimer variety." He thought appellant was also suffering from congestive heart failure which caused shortness of breath leading to "hypoxic encephalopathy, a deficit of oxygen to the brain." A person with a hypoxic condition has a clouded consciousness, is usually sleepy, and normal mental functioning is impaired. Colby believed appellant was delirious during the trial. Colby testified that he did not believe appellant could understand the complications of the appellate process or the complexity of his decision to waive appeal. In Colby's opinion appellant was unable to consult with this attorney with a reasonable degree of rational understanding and he was unable to "process his attorney's consultations." Colby concluded that appellant's waiver of his right to appeal was not a knowing and intelligent waiver. There was other testimony that appellant appeared to be sleeping part of the time during his trial.
The State offered the testimony of Mary Anderson, a psychiatrist. Anderson, after her court appointment, conducted a competency evaluation of appellant. Anderson found appellant was competent, able to work with his attorney, had a reasonable degree of rational understanding, and possessed a rational as well as factual understanding of the proceeding against him. Appellant demonstrated to Anderson his knowledge of what occurred at the trial and matters concerning his defense. Appellant discussed in detail the victim's testimony and expressed his surprise that the victim had done such a good job as a witness because he said she had been in and out of mental institutions. Appellant also told Anderson that if he received a new trial he believed the victim would not do such a good job with her tesimony the next time. Appellant discussed with Anderson the options he had at the punishment phase of the trial. He knew that he could appeal but chose to waive it for a more certain punishment. Anderson was of the opinion appellant did not meet the criteria for dementia. After she examined appellant's medical records, Anderson believed it possible appellant had a congestive heart problem, but she did not believe he was suffering from hypoxia.
Medical records admitted in evidence show that appellant said he retired from military service as a Major when he was thirty-nine years old. After his military retirement, appellant said he worked as a certified public accountant for thirty-one years and was working at his profession part-time until he was arrested. The record also shows that after his sentence was imposed, appellant spent twenty minutes instructing his wife concerning their real estate holdings, investments, and other matters.
The granting or denying of a motion for new trial lies within the sound discretion of the trial court, and an appellate court should not substitute its judgment for that of the trial court, but should rather decide whether the trial court's decision was arbitrary or unreasonable. See Lewis v. State, 911 S.W.2d 1, 7 (Tex.Crim.App.1995); State v. Gonzalez, 855 S.W.2d 692, 695-96 (Tex. Crim.App.1993). We conclude the trial court's denial of the motion for new trial was well within the trial court's discretion; it was not shown to be arbitrary or unreasonable.
In his motion for new trial and in his purported appeal, appellant contends that the trial court erred in failing to impanel a jury to determine appellant's competency and in failing to grant a new trial because of jury misconduct. Appellant's waiver of appeal and ineffectual notice of appeal, leaves us without jurisdiction to consider these points of error. However, we observe that appellant did not raise the competency issue before trial, and the evidence and circumstances did not raise the issue before appellant's sentence was imposed. Sentencing marks the final act of the trial. See Casey v. State, 924 S.W.2d 946, 949 (Tex.Crim.App. 1996); Williams v. State, 663 S.W.2d 832, 834 (Tex.Crim.App.1984). If a court determines that there is evidence to support a finding of incompetency to stand trial, the court shall set the issue for determination at any time prior to the sentencing of the defendant. See *935 Tex.Code Crim. Proc. Ann. art. 46.02, § 4(c) (West 1979). Because appellant knowingly and voluntarily gave up his right to appeal this case, he must be held to the bargain he made. Therefore, we have no authority to review the contentions of error he attempts to raise. Accordingly, the appeal must be, and is, dismissed for want of jurisdiction.
CARROLL, C.J., not participating.
NOTES
[*]  Before Carl E.F. Dally, Judge (retired), Court of Criminal Appeals, sitting by assignment. See Tex. Gov't Code Ann. § 74.003(b) (West 1988).
