Converts gamma-trimethylaminobutyraldehyde into gamma- butyrobetaine with high efficiency (in vitro). Can catalyze the irreversible oxidation of a broad range of aldehydes to the corresponding acids in an NAD-dependent reaction, but with low efficiency. Catalyzes the oxidation of aldehydes arising from biogenic amines and polyamines. {ECO:0000269|PubMed:10702312, ECO:0000269|PubMed:1799975, ECO:0000269|PubMed:30914451, ECO:0000269|PubMed:8645224}. This is the function of ALDH9A1 (aldehyde dehydrogenase 9 family member A1, Ensembl gene identifier ENSG00000143149).