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.