The Swarm ( episode ) The Doctor suffers from a computer malfunction ; " Voyager " is attacked by a swarm of alien warships . Summary . Teaser . After detecting an anomalous sensor reading , Lieutenants Tom Paris and Torres investigate in a shuttle while " Voyager " collects resources . During the investigation , the signal reappears and two alien s beam aboard the shuttle . The aliens seem to be attempting to communicate , then subsequently raise their weapons and fire on Paris and Torres , knocking them unconscious . Act One . On " Voyager " , The Doctor is trying his hand at opera . He ' s attempting to sing " O , soave fanciulla " , a duet from Act 1 of the Earth opera " La bohème " by Giacomo Puccini , on the holodeck with a holographic re - creation of Giuseppina Pentangeli , one of the greatest soprano of the 22nd century . However , the hologram of Pentangeli also duplicated her vanity and demanding temperament . They stop during the first part when The Doctor accuses his partner of rushing the tempo . In fact she is the one who comes in too early . She retorts that he has no feel for the music and that it ' s like she ' s singing with a computer . When they finally begin to sing again The Doctor has to stop once again because he can ' t remember the words , much to his partner ' s irritation and contempt . He blames it on her for getting him so upset that he can ' t even remember how to sing anymore . Just as he wants to delete her he is contacted by Captain Kathryn Janeway . She informs him there is an emergency and that he needs to report to sickbay . Just before he deletes his diva he informs her that he may consider singing with Maria Callas next time instead . Torres reawakens aboard " Voyager " and describe the events on the shuttle to the crew . Due to the neuroelectric shock , Paris is still unconscious and needs further treatment . While performing some common medical procedures , The Doctor seems to stutter a bit , becoming forgetful . In the captain ' s ready room , the senior staff meets to discuss the incident . Neelix informs the staff that he has heard of these aliens described by Torres but shudders at the thought of encountering them . He informs the captain that nobody knows much of this race but what is known is that they are very territorial . Most ships entering their space were never heard from again , and those that returned had all their crew dead . Unfortunately , going around their space would add fifteen months to the trip , something Janeway won ' t do . Chakotay suggests they can ' t possibly patrol all their territory , but Tuvok objects to violating their space as per Starfleet regulations . Despite Tuvok ' s protest , Janeway insists on the plan and sets it in motion , calling for a plan . Back in sickbay , The Doctor happily continues to perform a procedure to help Paris , singing the opera from before as he cleans his hands . However , he begins to realize that he ' s having trouble remembering the procedure . Act Two . He asks for Kes for assistance as he performs the procedure , but increasingly forgets what to do . Kes fortunately is able to take over and Paris is all right . After this incident , The Doctor reports his failings to Torres , who sees that the safety buffers she installed are breaking down . The Doctor suggests reinitializing his program , but Torres reminds everyone he would forget everything that ' s happened to him in the past two years . The Doctor insists he would rather be useful to the crew , but Kes makes an impassioned plea to Janeway . She insists The Doctor has become more than a hologram , and , indeed , Janeway then takes the view that , if any of the crew were sick , she would do everything to make them better . On the bridge , Kim and Chakotay inform Janeway of a plan to cross the alien territory . Janeway orders the helm . Later , Torres tries a few things in sickbay , now making The Doctor feel like a patient . She still doesn ' t know why the circuits are degrading , so she gets a " second opinion , " transferring The Doctor into the holodeck , where she runs Jupiter Station Diagnostic Program Alpha - 11 . There , they meet the diagnostic hologram , a holographic recreation of The Doctor ' s creator , Lewis Zimmerman . Act Three . Zimmerman , with a much less friendly personality than even The Doctor , asks Torres what the issue is . Completely ignoring The Doctor , considering it just a hologram , he analyzes the problem and finds out the program has been running two years . He inevitably comes up the solution of re - initializing the program , but Torres doesn ' t accept the option . When called to engineering , she orders Zimmerman to find out exactly why the memory circuits are degrading for a different solution . Meanwhile , Ensign Harry Kim devises a method to slip through the alien territory unnoticed by modifying the shield generator s to effectively hide the ship from the sensor net . It is noted that traveling at warp 9 . 75 for twelve hour s would take them a third of the way through the most narrow portion of the alien territory . Once at the border of the alien territory , the stealth shielding is activated and the ship begins traveling through . They note a swarm of the alien vessels , all powered down and initially inactive . Janeway orders them to continue in , and fortunately , the ships don ' t pursue . However , Paris sees that there appears to be some kind of drag on the engines . Back on the holodeck , Zimmerman eventually finds that The Doctor ' s personality subroutines have grown considerably . The diagnostic routine realizes the EMH has been active on its off - hours and developing relationships with the crew . Kes arrives to check on The Doctor and is questioned by the diagnostic hologram . She insists The Doctor is more than a set of algorithms , which Zimmerman finds utterly false , challenging that she can ' t believe he shares the feelings of friendship . He asks The Doctor directly if Kes is one of his friends , but , unfortunately , his memory loss forces him to state he doesn ' t know her . The " Voyager " is still seemingly evading the alien ships . However , sensors indicate a different ship that doesn ' t appear to belong in the area , so they drop out of warp to investigate . Kim finds one faint life sign on the ship , so Janeway orders it beamed aboard to sickbay . She also orders continued scans of the ship . Act Four . Janeway meets The Doctor and Kes in sickbay to question the alien , Chardis . He says he ' s from Mislen and his ship was attacked by numerous Swarm vessels . Rather than attacking with weaponry , they drained the energy from his ship and attempted to crush it . Then , they boarded and used weapons on them . He soon died from his injuries . The Doctor , unfortunately , is of no help during this , and Kes has to lead . Janeway says she can ' t spare Torres during their current predicament to help The Doctor , and recommends Kes keep The Doctor using his memory to maybe slow down the degradation . While investigating the ship , one of the alien craft that had still been attached to it powers up and scans " Voyager " . It emits a polaron pulse that cancels the stealth modifications to the shields and " Voyager " is detected by the Swarm vessels . Kes tries to occupy The Doctor , who now even forgets he is a hologram and cannot leave sickbay . She eventually sits him down and tries to keep him remembering events that happened . He briefly does remember Kes , and the first time he was activated . He also mentions the time he was rubbing " some woman ' s " feet , forgetting it was Kes . Then , his body flickers out , alarming him considerably , but Kes can ' t explain it . The Swarm approaches " Voyager " and Janeway calls for battle stations . Act Five . The Swarm doesn ' t appear to have weapons activated . Kes comes to the bridge to ask someone to help The Doctor , but Janeway can ' t spare anyone with what they ' re facing . Kes decides to go back to the holodeck and talk to the diagnostic hologram again . Zimmerman insists he can only diagnose , that he isn ' t an engineer , but Kes is determined to make him realize he can exceed his programming , as The Doctor has . She gets the idea that Zimmerman ' s holomatrix is the same as The Doctor . He says the same degradation will eventually occur to him , too , but Kes suggests a " graft " like in medicine . Zimmerman says it might be possible , much to Kes ' delight , but he cautions her optimism . The Swarm is now emitting interferometric pulse s which are cancelling the " Voyager " ' s shield strength completely . Janeway orders a phaser hit , but the energy gets reflected back onto the ship . Kim starts analyzing the pulses further . In sickbay , the diagnostic hologram expresses his doubts as he sets up the transfer . Finally , he gives Kes her instructions . The alien ships start attaching to the hull when Kim sees the pattern in the pulses : it ' s a lattice connecting the ships to each other . Janeway hopes to turn the pulses back on them by destroying one of the ships , causing a chain reaction . At the same time , she orders the shield frequency to have an inverse harmonic from the pulse . Just then , several of the alien crew , similar to those seen by Paris and Torres , attempt to teleport to the bridge and overwhelm " Voyager " s crew . They ' re unsuccessful , fortunately . Tuvok and Kim have their chance , and they successfully repel the alien ships . The Swarm backs off and they continue on their way , unabated . Torres now comes to sickbay and sees what Kes has been doing , forced to wait for the procedure to finish . It soon does , and Kes hesitantly calls for the EMH . It seems he is fixed , with the new holomatrix expanding his memory capabilities . However , he does not recognize Kes at all , or have any other memories of the past two years . Kes and Torres are disappointed , but then The Doctor starts singing his opera from the other room . Memorable quotes . " " You are an amateur , you have no sense of " rubato " , no " rallentando " . It ' s like singing with a computer ! " " " " Computer , pause music . " " " " What now ? " " " " I just forgot the words . " " " " I have so far never forgotten the lyric , that ' s the difference between amateur and professionali . " " " " It ' s just a momentary lapse , no need to over - react . " " " " I want another partner ! " " " " Addio , ( goodbye ) , Madam , next time I ' ll take my chances with Maria Callas ! Computer , delete the diva . " " " " Imbecille , pensa veramente . . . ( Imbecile , he truly thinks . . . ) " " as her program goes offline . " " " All the sopranos seem to have the most irritating personalities . These women are arrogant , superior , condescending ; I can ' t imagine anyone behaving that way . " " " " Don ' t touch that ! " " " " Look at all this useless information floating around your buffer : friendships with the crew , relationships with . . . women ? Do they find you attractive ? " " " " lt was only during my off hours . " " " " You ' re supposed to be off during your off hours ! " " " " Nicoletti , we ' re going to have to try a dilithium realignment on the fly . Let ' s figure out how to do it without killing everyone in engineering . " " " " Perhaps you can tell me who ’ s been feeding all this useless information into its database . " " " " What do you mean ? " " " " I ' ll give you an example . Ah ! Here ’ s something in its personality subroutine . " " ( taps console ) " " He ’ s been studying opera , what ’ s wrong with that ? " " " " It wasn ’ t programmed to be a tenor , it was programmed to be a physician ! " " " " He ' s a sick man . This is where sick people come . " " " " I ' m a diagnostic tool , not an engineer ! " " " " I can see where you get your charming personality . " " " " Not to mention my hairline . " " " " We are aware of that option . Would it be possible to expand his memory circuits instead ? " " " " Of course . Schedule it for your next maintenance layover at McKinley Station . " " " " I ' m afraid that isn ' t possible – we ' re thousands of light years from Federation space . " " " " Well , there ' s nothing more " I " can do . Either reinitialize it or live with the knowledge that eventually this EMH will end up with the intellectual capacity of a parsnip . " " " " ( panicking ) What are you saying ? ! " " Links and references . References . adaptive heuristic matrix ; algorithm ; analgesic ; antimatter reaction chamber ; aria ; autonomic nervous system ; axon ; bedside manner ; ; Maria ; ; cascade failure ; Christmas tree ; conductor ( music ) ; cortical analeptic ; cramps ; cranial nerve ; Diagnostic Program Alpha 1 - 1 ; dilithium matrix ; duck ; Emergency Medical Hologram ; Emergency Medical Holographic Channel ; Emergency Medical System ; ethorin pulse ; evasive pattern gamma - 4 ; Federation ; fractal pattern ; ; galactic background noise ; ; gigahertz ; gigaquad ; hairline ; high school ; holo - array ; holodeck ; holographic matrix ; hydrocortilene ; inflammation ; interferometric pulse ; Janeway ( Male Admiral ) ; Jupiter Station ; Jupiter Station Holoprogramming Center ; Klingon ; Lake Como ; level 4 diagnostic ; memory fragmentation ; matrix overlay ; McKinley Station ; medical tricorder ; memory circuit ; Mimi ; Mislen ; Mislenite ; Mislenite freighter ; Mislenite freighter crew ; motor cortex reconstruction ; motor neuron ; myelin ; myelin regenerator ; neural pathway ; neuroelectric weapon ; neuron ; " O , soave fanciulla " ; occipital lobe ; opera ; optical subroutine ; parsec ; parsnip ; Parrises squares ; ; perimeter grid ; personality subroutine ; photon torpedo ; physician ; polarity ; polaron burst ; preganglionic fiber ; " Program Zimmerman Alpha - 1 " ; , red alert ; refraction pulse ; resonance particle wave ; respiratory arrest ; retinal imager ; " Sailing on Lake Como " ; sensor net ; shield frequency ; shield polarity ; snake ; Soral ; somatic nervous system ; soprano ; spinal column ; Starfleet Regulations ; subroutine ; Swarm species ; Swarm species language ; Swarm species vessel ; synapse ; T ' Penna ; Tabran monk ; tachyon detection grid ; tenor ; turbolift ; universal translator ; vasoconstrictor ; Vulcan ( planet ) ; yellow dwarf ;