Actually, there are devices made of two dissimilar metals where if one side is kept warm and the other side is kept cool they will generate electricity.
This is generally called the Seebeck coefficient and can be found in devices used in thermoelectric cooler/warmers.
However having a fabric that can exhibit the Seebeck effect could be pretty useful and as the article mentions, might someday enable 'user powered' devices.
Swedish researchers have developed a revolutionary silk-based textile that harvests electricity from body heat, potentially offering a future where wearable devices may no longer require batteries. The durable, washable fabric could transform how we power everything from fitness trackers to health sensors.