Strange Sound When Filling

My washer is a small Whirlpool Compact apartment type, and has developed a short rapid chugging noise when filling, and now takes forever to fill, but seems to drain normally. Does anyone know what this might be? I’m thinking the machines pump must be going!