Apple unveiled an updated connected TV box for the first time in three years Wednesday, turning Apple TV into a contender against its more modern rivals.

The revamped Apple TV weaves in Apple's voice-controlled digital assistant, allowing users to search through Netflix, Hulu and other services connected to the device. It comes with a new remote control that incorporates a trackpad.

Apple also took a page from its own iPhone playbook, introducing a new operating system that supports a world of apps. Called tvOS, the software allows Apple TV to now run new kinds of media, including games and fitness programs.

"Our vision for TV is simple," Chief Executive Tim Cook said at an event in San Francisco, where the company also revealed its updated iPhones. "We believe the future of television is apps."

The new Apple TV, which will be available in October, comes as the consumer electronics giant finds itself battling companies like Roku, Google (with its Chromecast television plug-in) and Amazon to attract buyers. Some of those products already include voice-activated features. Amazon's Fire TV also has an optional game controller.

Apple was early to streaming media though it was careful to position Apple TV as a "hobby." Still, the company has sold 25 million Apple TVs during the product's lifetime. But Apple hasn't upgraded the Apple TV to a new generation since March 2012, and sales have suffered even amid rising consumer demand for online media. Competitors have been quick to capitalize on that demand by updating their products with new features and content, according to analysts.

The new version of Apple TV is more expensive than earlier versions (it currently costs $69) and pricier than its competition. An Apple TV with 32 gigabytes of storage costs $149, and one with 64GB is $199. By comparison, Roku sells a $100 streaming-media box and a $50 streaming stick. Amazon's Fire TV box sells for $99 and its Fire TV Stick cost $39. Google's Chromecast, which plugs into the back of a television, is $35.

The new Apple TV will include an App Store and a new remote control that responds to touch. With it, viewers can slide through a thumbnail display of movies, for example, or fast-forward through a show.

Now playing:Watch this:
The new Apple TV combines touch, search and gaming in...

2:08

The remote also features a button that summons Siri, Apple's voice-command digital assistant. Siri will search across Netflix, Hulu, HBO, Showtime and Apple's own iTunes, but not direct competitor Amazon. Viewers can also use their voices to tell the Apple TV to jump ahead in a video, or find content by cast, director, age rating or date.

Apple on Wednesday showcased Apple TV running the Airbnb app for short-term rentals, Gilt for shopping and the game Crossy Road.

Apple TV will be sold in more than 180 countries by the end of the year.