In the absence of any articles specifically on this subject, as many focus on modern cinema or lead roles only, I submit the appearance of extras speaking Mandarin (and in some cases Cantonese) in Harold Lloyds Welcome Danger in 1929:
What was the first American-made movie/TV show in which Mandarin or Cantonese was accurately spoken?
Well, you could not really go back further than when film stopped being silent and became 'talkies' (1926 to 1928 including soundies - synchronized music, effects and part-talkies, with all-talkies prevalent from 1929), and similarly this would be the period in which television started in the US (W2XCW started in 1928).
Although you would think Anna May Wong would be on the list of Asian leads, she was, but in the silent era, and by the time talkies became popular in the US, Wong was actually in Europe instead, having given up on getting lead roles in Hollywood, only going back to the US in the early 1930s. Her 1931 Daughter of the Dragon, seems to have brief Cantonese spoken by extras in the background, around 47 minutes in but its barely audible.
Wong would later have the first asian television lead in 1951, in The Gallery of Madame Liu-Tsong.
This is a list of films produced during the transition from silent to talkies:
The first I came across where I heard Chinese of any sort spoken was Harold Lloyd's first talkie 'Welcome Danger', released in 1929.
Particularly this scene (which before it, had a scene with an uncredited James Wang playing Dr Chang Gow, but entirely in English), appears to have an extra speaking Mandarin:
Scene from Harold Lloyd's 'Welcome Danger', 1929
About 47 minutes in it suffers from terrible dubbing during the Chinatown fight, probably as a result of turning scenes that were previously shot silent into a talkie.
Mandarin or Cantonese?
Most of the Chinese that had settled in the US and would have been part of the system in Hollywood were likely to be Cantonese, owing to most early immigrants coming from the Canton region.
Indeed, speaking any other language, such as Mandarin proved to be difficult in early Hollywood as this 2014 article indicates:
How Shirley Temple Helped Pioneer Mandarin
the 1936 movie Stowaway in which she played Barbara “Ching Ching” Stewart, an orphan stranded in China. She is saved from bandits and taken to Shanghai where she meets a rich American playboy wasting his time in the city’s nightclubs and stows away aboard his ship back to America.
The studio agreed to use Mandarin (due to pressure from the Nationalists in China) in the movie, but had a problem as the vast majority of the Chinese extras they regularly used in such movies were native Cantonese speakers and spoke little to no Mandarin. So, organised by Paul Fong (Chinese language expert sent to 20th Century Fox), Shirley started Chinese classes alongside the extras who also needed to learn Mandarin. In the movie she uses about 400 words of Mandarin and sings a little song in Chinese too. All thanks to Fong who hired Bessie Nyi, a Shanghainese in LA who had studied at the University of Southern California, to teach Shirley while he himself taught the extras – 900 of them in all. It was a dedicated process and Mandarin is spoken even in several scenes set in Hong Kong!
Shirley Temple, 1936
So, perhaps Stowaway could be the first American-mode movie in which a lead speaks a substantial amount of dialogue in Mandarin.
So although Cantonese was prevalent in early Hollywood behind the scenes, by the time talkies became common there seems to have been a push for hearing Mandarin instead, leading to that being heard first rather than Cantonese.
An interesting read: