add belongs_to function to speech model and allow null states in analysis controller