The Stirling Generator does use a temperature difference between two substances as example 2 liquids to create electricity. It can also work in reverse: Use electricity to warm the one substance and cool the other.