GO:0047936: glucose 1-dehydrogenase [NAD(P)] activity
Catalysis of the reaction: beta-D-glucose + NAD(P)+ = D-glucono-1,5-lactone + NAD(P)H.