Consumer prices rose by 2.9% in July compared to a year ago, strengthening hopes of a Federal Reserve interest rate cut in September.