Echo chambers and information transmission biases in homophilic and heterophilic networks