For a while now, Pixel 2 smartphone owners have been able to use the Google Assistant app to identify songs being played around them. This feature is similar to what Shazam offers and has been limited to those who own the new Pixel phone from Google.
Google will not limit availability of this feature to the Pixel smartphones only, the company has confirmed that it will start rolling out the feature to non-Google Pixel devices too. Some reports are confirming the availability of the feature on devices from other manufacturers including Nextbit and OnePlus but not on devices from other brands. OnePlus has also confirmed this as you can see below.
Keep in mind that the feature has just started rolling out and may not be available to all users at the moment. Be patient as Google says the rollout began this past weekend and may take time to get to all users. I do not have it on my device and neither have I seen it on any of the people around me. Give it a few more days or weeks for it to get to your device.