[RMXP] Is it possible to use ccoa's UMS to have multiple SE 'voices' for different characters?

Hello, I'm very sorry if this is the wrong place to post! I'm extremely new to all this 😴

I've been slowly learning how ccoa's UMS script works and how it's possible to play a sound effect whenever a letter of text appears. I really like this feature and want to use it, but I'm curious if there's a way to use different sound effects for different characters, to sort of create the illusion of them having different voices.

What I think I need to do is use these parts of the script:
$game_system.sound_effect = "sename"

@sound_effect = "SENAME"

if $game_system.sound_effect != ""
Audio.se_play("Audio/SE/" + $game_system.sound_effect, 80, 100)
end

But I need to have multiple of them that I can use for different text boxes, rather than just having one sound effect that plays universally for every text box!
Thank you so much for any help at all, I'm a little slow when it comes to these things and wanted to see if I could get any advice 🙏 Please let me know if anything is unclear!
I have moved his thread to RGSSx Script Support.
Got any link to the script?
And you could also use an Array of SE's and play only one at a time, followed by the next one, etc.
Got any link to the script?
And you could also use an Array of SE's and play only one at a time, followed by the next one, etc.
Here's a link to the script!
I just realized I didn't even put which version of RPGMaker I'm using in my post *facepalm*
I'm using RPGMaker XP, so I'm not sure if Arrays are possible in that version!
=_= Actually arrays are available in any decent programming language. Here's an example in Ruby and it's also valid for RGSS as well.

Ruby:
class Window_Message
  SE = ["Se1", "Se2"]
end

Never add the file extension.

IMPORTANT EDIT​

Below you can find a patch or extension or modification of the UMS.
Add as many SE filenames to the TYPE_SE Array as needed.

Ruby:
# * UMS Many SE XP * #
#   Scripter : Kyonides Arkanthes
#   2023-08-15

module Audio
  TYPE_SE = ["", "", ""]
end

class Game_Temp
  def any_call?
    @battle_calling or @shop_calling or @name_calling or
    @menu_calling or @save_calling or @debug_calling
  end
end

class Game_System
  def no_msg_shake?
    @message_event != -1 and @shake == 0
  end

  def dispose_windows
    @indy_windows.each_pair do |name, window| 
      next unless window.show
      window.dispose
      @indy_windows.delete(name)
    end
  end
end

class Window_Message
  alias :kyon_ums_many_se_win_mess_init :initialize
  alias :kyon_ums_many_se_win_mess_term :terminate_message
  def initialize
    kyon_ums_many_se_win_mess_init
    @se_index = 0
    @se_max = Audio::TYPE_SE.size
  end

  def terminate_message
    kyon_ums_many_se_win_mess_term
    @se_index = 0
  end

  def shake_window
    if @ascending
      if @target_x != self.x
        self.x += 1
      else
        @ascending = false
        @target_x = self.x - ($game_system.shake * 2)
      end
    else 
      if @target_x != self.x
        self.x -= 1
      else
        @ascending = true
        @target_x = self.x + ($game_system.shake * 2)
      end
    end
  end

  def shake_text
    if @ascending
      if @target_x2 != @shake_sprite.x
        @shake_sprite.x += 1
      else
        @ascending = false
        @target_x2 = @shake_sprite.x - ($game_system.text_shake * 2)
      end
    else 
      if @target_x2 != @shake_sprite.x
        @shake_sprite.x -= 1
      else
        @ascending = true
        @target_x2 = @shake_sprite.x + ($game_system.text_shake * 2)
      end
    end
  end

  def fade_in_window
    if $game_temp.message_text == ""
      @fade_in = false
      return
    end
    self.contents_opacity += 24
    if $game_system.face_graphic != ""
      @face.opacity += 24
    end
    if $game_system.window_image != nil
      @window_back.opacity += 24
    end
    if $game_system.comic_enabled and $game_system.message_event != -1
      @comic.opacity = self.opacity
      @comic.visible = self.visible
    end
    @shake_sprite.visible = true
    if $game_system.name != "" and @show
      @name_window.visible = true
      if $game_system.name_window
        @name_window.dummy_window.visible = true
      end
    end
    if @input_number_window != nil
      @input_number_window.contents_opacity += 24
    end
    if self.contents_opacity == 255
      @fade_in = false
    end
  end

  def update_input_number
    @input_number_window.update
    if Input.trigger?(Input::C)
      $game_system.se_play($data_system.decision_se)
      var_id = $game_temp.num_input_variable_id
      $game_variables[var_id] = @input_number_window.number
      $game_map.need_refresh = true
      @input_number_window.dispose
      @input_number_window = nil
      terminate_message
    end
  end

  def process_type_se
    sfx = Audio::TYPE_SE[@se_index]
    Audio.se_play("Audio/SE/" + sfx, 80, 100) unless sfx.empty?
    @se_index = (@se_index + 1) % @se_max
    @count = Graphics.frame_count
    c = @text.slice!(/./m)
    write_char(c) if c
  end

  def update
    super
    if (@contents_showing and $game_system.no_msg_shake?) or
        $game_system.animated_faces
      reset_window(false)
    end
    shake_window if $game_system.shake != 0  # shake the window
    shake_text if $game_system.text_shake != 0  # shake the text
    @name_window.update
    if @wait > 0
      @wait -= 1
      if @wait == 0
        terminate_message
        return
      end
    end
    # If fade in
    if @fade_in
      fade_in_window
      return
    end
    # write the text
    if @text != nil and @text != ""
      speed = $game_system.write_speed
      if $game_system.text_mode == ALL_AT_ONCE or $game_temp.in_battle
        while (c = @text.slice!(/./m)) != nil
          write_char(c)
        end
        $game_system.slave_windows.each_value { |window| window.write_all }
        return
      end
      if $game_system.text_skip
        if $game_system.skip_mode == WRITE_FASTER and Input.press?(Input::C)
          # the player is holding the action button, write faster
          speed /= 3
        elsif $game_system.skip_mode == WRITE_ALL and Input.trigger?(Input::C)
          # the player pressed the action button, write all the text
          while (c = @text.slice!(/./m)) != nil
            write_char(c)
          end
          $game_system.slave_windows.each_value { |window| window.write_all }
          return
        end
      end
      while @ignore
        c = @text.slice!(/./m)
        write_char(c) if c != nil
      end
      if @pause_time > 0
        @pause_time -= 1
        return
      end
      if Graphics.frame_count - @count >= speed and @se_max > 0
        process_type_se
      end
      return
    end
    if $game_system.animated_faces and $game_system.resting_face != ""
      @done = true
    end
    # If inputting number
    if @input_number_window != nil
      update_input_number
      return
    end
    return if @wait != 0
    # If message is being displayed and contents are all written
    if @contents_showing
      # if choice
      if $game_temp.choice_max > 0
        if !@choice_window.active
          @choice_window.visible = true
          @choice_window.active = true
          @choice_window.index = 0
        end
        @choice_window.update
      else
        # If choice isn't being displayed, show pause sign
        self.pause = $game_system.show_pause
      end
      # Cancel
      if Input.trigger?(Input::B)
        if $game_temp.choice_max > 0 and $game_temp.choice_cancel_type > 0
          $game_system.se_play($data_system.cancel_se)
          $game_temp.choice_proc.call($game_temp.choice_cancel_type - 1)
          terminate_message
        end
      end
      # Confirm
      if Input.trigger?(Input::C) and !(@wait > 0)
        @done = true
        $game_system.slave_windows.each_value do |window| 
          window.write_all 
          if !window.done
            @done = false
          end
        end
        if @done
          if $game_temp.choice_max > 0
            $game_system.se_play($data_system.decision_se)
            $game_temp.choice_proc.call(@choice_window.index)
          end
          terminate_message
        else
          @finishing_up = true
        end
      end
      return
    end
    if @finishing_up
      $game_system.slave_windows.each_value do |window| 
        if !window.done
          @done = true
          break
        end
      end
      terminate_message unless @done
    end
    # If display wait message or choice exists when not fading out
    if !@fade_out and $game_temp.message_text != nil
      @contents_showing = true
      $game_temp.message_window_showing = true
      reset_window
      refresh
      Graphics.frame_reset
      self.visible = @show
      self.contents_opacity = 0
      @input_number_window.contents_opacity = 0 if @input_number_window != nil
      @fade_in = true
      return
    end
    # If message which should be displayed is not shown, but window is visible
    if self.visible
      @fade_out = true
      self.opacity -= 48
      @name_window.opacity -= 48
      @shake_sprite.opacity -= 48
      @comic.opacity -= 48
      @face.opacity -= 48
      @window_back.opacity -= 48
      if self.opacity == 0
        self.visible = false
        @face.opacity = 0
        @window_back.opacity = 0
        @choice_window.visible = false
        @choice_window.active = false
        @comic.opacity = 0
        @name_window.visible = false
        @shake_sprite.bitmap.clear
        @shake_sprite.opacity = 255
        @name_window.dummy_window.visible = false
        @name_window.update
        @fade_out = false
        $game_temp.message_window_showing = false
      end
      return
    end
    $game_system.dispose_windows if $game_temp.any_call?
  end
end

Original thread: https://forums.rpgmakerweb.com/threads/rmxp-is-it-possible-to-use-ccoas-ums-to-have-multiple-se-voices-for-different-characters.160332/