Anyone knows how to use python script to access the micphone of Respeaker Core V2?

I am trying to build a voice assistant (not using Alexa or google assistant) from scratch by using python. There are some Python libraries, like speech_recognition. Those libraries work on Win10 and Ubuntu. But I don’t know how it works on Respeaker Core V2. Is there any tutorial of that? Thanks.