ComfyUI  >  Nodes  >  pythongosssss/ComfyUI-Custom-Scripts >  PlaySound 🐍

ComfyUI Node: PlaySound 🐍

Class Name

PlaySound|pysssss

Category
utils
Author
pythongosssss (Account age: 538 days)
Extension
pythongosssss/ComfyUI-Custom-Scripts
Latest Updated
8/2/2024
Github Stars
1.5K

How to Install pythongosssss/ComfyUI-Custom-Scripts

Install this extension via the ComfyUI Manager by searching for  pythongosssss/ComfyUI-Custom-Scripts
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter pythongosssss/ComfyUI-Custom-Scripts in the search bar
After installation, click the  Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • High-speed GPU machines
  • 200+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 50+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

PlaySound 🐍 Description

Play sound based on conditions for auditory notifications in workflow.

PlaySound 🐍| PlaySound 🐍:

The PlaySound| PlaySound 🐍 node is designed to play a sound file based on specific conditions, providing an auditory notification system within your workflow. This node is particularly useful for alerting you when certain events occur, such as the completion of a task or when the queue is empty. By integrating this node, you can enhance your workflow with audio cues, ensuring you are promptly informed of important events without needing to constantly monitor your system visually. The node offers flexibility in terms of when the sound is played, the volume level, and the specific sound file used, making it a versatile tool for various notification needs.

PlaySound 🐍| PlaySound 🐍 Input Parameters:

any

This parameter acts as a wildcard string that is always equal in not equal comparisons. It is used internally by the node and does not require any specific input from you.

mode

This parameter determines the condition under which the sound will be played. It has two options: always and on empty queue. Selecting always will play the sound every time the node is executed, while on empty queue will play the sound only when the queue is empty. This allows you to customize the notification behavior based on your specific needs.

volume

This parameter controls the volume level of the sound playback. It accepts a floating-point value between 0 and 1, with a default value of 0.5. The minimum value is 0, which represents mute, and the maximum value is 1, which represents full volume. Adjusting this parameter allows you to set the sound to a comfortable listening level.

file

This parameter specifies the sound file to be played. It accepts a string representing the file name, with a default value of notify.mp3. You can change this to any valid sound file name that is accessible within your system. This flexibility allows you to choose a sound that best suits your notification preferences.

PlaySound 🐍| PlaySound 🐍 Output Parameters:

any

The output parameter any is a wildcard string that is returned by the node. It serves as a placeholder and is used internally to maintain the node's functionality within the workflow. This output does not require any specific interpretation or action from you.

PlaySound 🐍| PlaySound 🐍 Usage Tips:

  • To ensure you are notified when a task is completed, set the mode parameter to always.
  • If you only want to be notified when the queue is empty, set the mode parameter to on empty queue.
  • Adjust the volume parameter to a level that is audible but not disruptive to your environment.
  • Customize the file parameter with a sound file that you find pleasant or attention-grabbing.

PlaySound 🐍| PlaySound 🐍 Common Errors and Solutions:

File not found: <file_name>

  • Explanation: The specified sound file could not be located in the system.
  • Solution: Ensure that the file name is correct and that the file is located in a directory accessible by the node. Verify the file path if necessary.

Invalid volume value

  • Explanation: The volume parameter is set to a value outside the acceptable range (0 to 1).
  • Solution: Adjust the volume parameter to a value between 0 and 1. The default value is 0.5.

Unsupported mode value

  • Explanation: The mode parameter is set to a value other than always or on empty queue.
  • Solution: Ensure that the mode parameter is set to either always or on empty queue. These are the only supported values.

PlaySound 🐍 Related Nodes

Go back to the extension to check out more related nodes.
pythongosssss/ComfyUI-Custom-Scripts
RunComfy

© Copyright 2024 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals.