GO:0004833:   tryptophan 2,3-dioxygenase activity
Catalysis of the reaction: L-tryptophan + O2 = N-formyl-L-kynurenine.