Jeremiah is probably describing the impact that his prophetic vision of the looming invasion has had on him. He hears the sound of the trumpet and the alarm of war.
This leaves him in a very disturbed state because he knows that soon the nation will experience the anguish that he is feeling, and he simply cannot keep quiet. He must speak; he must warn.1
19 My anguish, my anguish! I writhe in pain! Oh the walls of my heart! My heart is beating wildly; I cannot keep silent, for I hear the sound of the trumpet, the alarm of war.