labvanced logoLabVanced
Contact
    • Remote Physiological Measurements
    • Eye Tracking
    • Head & Face-Tracking
    • Emotion Detection
    • Heart Rate Detection (rPPG)
    • Generative AI
    • Audio Transcription
    • EEG & Hardware Integrations
    • Decision Making
    • Reaction Times
    • Keyboard Inputs
    • Mouse Tracking
    • Mobile / Touch
    • Questionnaires
    • Gamepad / Joystick Integration
    • Audio Recordings
    • Audio Transcription
    • Video Recordings
    • Screen Recordings
    • Photos / Snapshots
    • Video Conferencing
    • Canvas Drawings
    • Build with AI
    • Build with Spreadsheets
    • Using the Experiment Editor
    • Coding
    • Creating Questionnaires
    • Balancing & Randomization
    • UX & Website Testing
    • Single Session Studies
    • Factorial Designs
    • Longitudinal & Multi-session Studies
    • Individual & Case Studies
    • Real-time Multi-user Studies
    • Interviews & Video Calls
    • Surveys & Questionnaires
    • Experience Sampling & Diaries
    • Classroom & Group Testing
    • Interventions & Clinical Trials
    • In the Browser
    • Mobile App
    • Desktop App
    • WebBridge Chrome Extension
    • Stroop Test
    • Flanker Task
    • N-back Task
    • Implicit Association Test
    • Trail Making Test
    • Digit Span
    • Corsi Block Tapping
    • Tower of London
    • Balloon Analog Risk Task
    • Preferential Looking
    • Browse more →
    • DASS-21
    • GAD-7
    • Rosenberg Self-Esteem Scale
    • PHQ-9
    • Ten-Item Personality Inventory
    • Big Five Personality Test
    • Adult ADHD Self-Report Scale
    • Browse more →
    • Building a Multi-user Study
    • Webcam Eye Tracking with AOIs
    • Website Frame Eye Tracking
    • Conditional Eye Tracking Opt-in
    • ChatGPT Study
    • Desktop App Study with EEG
    • Between-subjects Group Balancing
    • Building a Reading Study
    • Stroop Task
    • Lexical Decision Task
    • Browse more →
    Public Experiment Library
    • Arts Research
    • Clinical Psychology & Neuropsychology Medicine
    • Cognitive Psychology
    • Developmental Psychology
    • Behavioral Economics & Decision Science
    • Educational Research & Psychology
    • HCI & Human Factors
    • Linguistics & Language Sciences
    • Consumer & Marketing Research
    • Social & Personality Psychology
    • Sport & Movement Science
    • UX & Website Testing
    • Executive Functions
    • Language & Reading
    • Decision-Making & Reasoning
    • Attention
    • Overview
    • HCI & Human Factors
    • UX & Website Testing
    • Consumer & Marketing Research
    • White-Label App
    • PageGazer
    • Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela Markova
    • Eye Tracking for Influencer MarketingDr. Alexander Edeling
    • Eye Tracking Infant Word ComprehensionDr. Giulia Calignano
    • Sentence Reading and Grammar JudgmentsDr. Jonathan Mirault
    • Regulating Emotions with MusicDr. Katrin Starcke
    • Game-Based Grammar Learning in ChildrenDr. Mireia Marimon
    • Gaze Cueing and AutismMax Soares Miehstein
    • Personality and Hearing in NoiseDr. Malte Wöstmann
    • All interviews →
    • Lab Notes
    • How to Cite Labvanced
    • Labvanced Platform Paper (2017)
    • Webcam Eye Tracking Validation (2024)
    • Webcam Eye Tracking Studies
    • Cognitive Psychology Studies
    • Developmental Psychology Studies
    • Linguistics Studies
    • See all publications →
    • Getting Started
    • Guide
    • Video Tutorials
    • Walkthroughs
    • Live Chat
    • Webinars & Onboarding Calls
    • AI Assistant
    • FAQ
    • Importing Templates Guide
    • Test Templates
    • Live Eye Tracking Metrics
    • Mouse Tracking Demo
    • ChatGPT Demo
    • Audio Recording Object Demo
    • Adding Image Stimuli Demo
    • Score & Feedback Demo
    • Browse all technical demos →
    • Timing Precision
    • Stimuli Presentation
    • Headphone Checks
    • Bot Checks
    • Participant Management
    • Comparisons
    • Research Blog
    • Prolific Integration
    • CloudResearch Integration
    • Sona Systems Integration
    • BeSample Integration
    • Panelabs Integration
    • Clickworker Integration
    • Labvanced Webhook API
    • Labvanced REST API
    • About Us
    • Newsletter Archive
    • Terms & Conditions
    • Data Security & Data Privacy
    • Technical & Organisational Measures
    • Accessibility
    • W-8BEN-E Form
    • Data Processing Agreement Template
    LinkedInYouTubeDiscord
    • Individual
    • Lab
    • Department / Consortium
    • Teaching
    • Campus
    • Commercial
    • Browse recording top-ups →
    • Browse AI token top-ups →
    • Overview
    • Study Building
    • Subject Recruitment
    • Dedicated Support
    Checkout
  • Contact
    • ZH
      • 中國人
      • Deutsch
      • Français
      • Español
      • English
      • 日本語
    • Logout
    • Loginlogin icon
    Platform
    Labvanced makes it easy to implement the most advanced study design and reliably collect your data.
    Biosignals & AI
    Remote Physiological MeasurementsEye TrackingHead & Face-TrackingEmotion DetectionHeart Rate Detection (rPPG)Generative AIAudio TranscriptionEEG & Hardware Integrations
    Behavioral Recordings
    Decision MakingReaction TimesKeyboard InputsMouse TrackingMobile / TouchQuestionnairesGamepad / Joystick Integration
    Media Recordings
    Audio RecordingsAudio TranscriptionVideo RecordingsScreen RecordingsPhotos / SnapshotsVideo ConferencingCanvas Drawings
    Implementation Techniques
    Build with AIBuild with SpreadsheetsUsing the Experiment EditorCodingCreating QuestionnairesBalancing & RandomizationUX & Website Testing
    Study Formats

    Your study can take whatever format your research needs. Here are a few popular examples.

    Single Session StudiesFactorial DesignsLongitudinal & Multi-session StudiesIndividual & Case StudiesReal-time Multi-user StudiesInterviews & Video CallsSurveys & QuestionnairesExperience Sampling & DiariesClassroom & Group TestingInterventions & Clinical Trials
    Where Studies Run

    Run your study online in the browser, on mobile or tablet with the mobile app, or in-lab with the desktop app.

    In the BrowserMobile AppDesktop AppWebBridge Chrome Extension
    Tests
    Explore cognitive tests, questionnaires, walkthroughs, and our public experiment library: a starting point for your next study.
    Popular Cognitive Tests
    Stroop TestFlanker TaskN-back TaskImplicit Association TestTrail Making TestDigit SpanCorsi Block TappingTower of LondonBalloon Analog Risk TaskPreferential Looking
    Browse more →
    Questionnaires & Scales
    DASS-21GAD-7Rosenberg Self-Esteem ScalePHQ-9Ten-Item Personality InventoryBig Five Personality TestAdult ADHD Self-Report Scale
    Browse more →
    Public Experiment Library

    Take a look at what other researchers in the community are doing through our extensive, open catalog of shared studies.

    Open the public library →
    Walkthroughs

    Step-by-step builds of complete studies, from a blank project to a running experiment, that you can follow along or adapt.

    Building a Multi-user StudyWebcam Eye Tracking with AOIsWebsite Frame Eye TrackingConditional Eye Tracking Opt-inChatGPT StudyDesktop App Study with EEGBetween-subjects Group BalancingBuilding a Reading StudyStroop TaskLexical Decision Task
    Browse more →
    Research
    One platform for students, academics, and industry researchers studying human behavior.
    Harvard UniversityStanford UniversityCambridge UniversityUCLNYUMax Planck InstituteUCLATU Munich

    Trusted by researchers at 1,500+ universities worldwide

    Academic Research
    Arts ResearchClinical Psychology & Neuropsychology MedicineCognitive PsychologyDevelopmental PsychologyBehavioral Economics & Decision ScienceEducational Research & PsychologyHCI & Human FactorsLinguistics & Language SciencesConsumer & Marketing ResearchSocial & Personality PsychologySport & Movement ScienceUX & Website Testing
    Research Areas
    Executive FunctionsLanguage & ReadingDecision-Making & ReasoningAttention
    Industry / Commercial
    OverviewHCI & Human FactorsUX & Website TestingConsumer & Marketing ResearchWhite-Label AppPageGazer
    Researcher Interviews

    Conversations with researchers about the studies they ran with Labvanced, what worked, and what they learned.

    Webcam vs. Lab Eye Tracking in InfantsAnna Banki & Gabriela MarkovaEye Tracking for Influencer MarketingDr. Alexander EdelingEye Tracking Infant Word ComprehensionDr. Giulia CalignanoSentence Reading and Grammar JudgmentsDr. Jonathan MiraultRegulating Emotions with MusicDr. Katrin StarckeGame-Based Grammar Learning in ChildrenDr. Mireia MarimonGaze Cueing and AutismMax Soares MiehsteinPersonality and Hearing in NoiseDr. Malte Wöstmann
    All interviews →
    Our Research
    Lab NotesHow to Cite Labvanced
    Peer Reviewed Studies

    A selection of peer-reviewed work built on Labvanced: our own platform and validation papers, and studies by the research community grouped by area. Hundreds more are listed on the full publications page.

    Labvanced Platform Paper (2017)Webcam Eye Tracking Validation (2024)Webcam Eye Tracking StudiesCognitive Psychology StudiesDevelopmental Psychology StudiesLinguistics Studies
    See all publications →
    Resources
    Valuable resources to help you learn the platform, stay updated, and more.
    Documentation
    Getting StartedGuideVideo TutorialsWalkthroughs
    Support
    Live ChatWebinars & Onboarding CallsAI AssistantFAQ
    Templates & Demos

    These are a few popular examples. Browse our guide and a selection of technical demos to get started with implementation.

    Importing Templates GuideTest TemplatesLive Eye Tracking MetricsMouse Tracking DemoChatGPT DemoAudio Recording Object DemoAdding Image Stimuli DemoScore & Feedback Demo
    Browse all technical demos →
    Methodology
    Timing PrecisionStimuli PresentationHeadphone ChecksBot ChecksParticipant ManagementComparisonsResearch Blog
    Integrations & APIs
    Prolific IntegrationCloudResearch IntegrationSona Systems IntegrationBeSample IntegrationPanelabs IntegrationClickworker IntegrationLabvanced Webhook APILabvanced REST API
    Company & Legal
    About UsNewsletter ArchiveTerms & ConditionsData Security & Data PrivacyTechnical & Organisational MeasuresAccessibilityW-8BEN-E FormData Processing Agreement Template
    LinkedInYouTubeDiscord
    Pricing
    Our licenses and additional services at a glance.
    Licenses
    IndividualLabDepartment / ConsortiumTeachingCampusCommercial
    Top-Ups

    Need more recordings for your lab or your own research? Simply use one of these recording top-up packages.

    Browse recording top-ups →

    Need more AI tokens for the AI assistant and study translations? Simply use one of these AI token top-up packages.

    Browse AI token top-ups →
    Additional Services

    Hire Labvanced’s expert team to quickly bring your project to the level of rigor it needs.

    OverviewStudy BuildingSubject RecruitmentDedicated Support
    Checkout

    Ready to purchase a license or top-up? Head straight to checkout.

    Go to checkout →
    • 中國人
    • Deutsch
    • Français
    • Español
    • English
    • 日本語
    • 入门
    • 指南
      • 入门

        • 任务编辑器
        • 框架
          • 画布框架
          • 页面框架
          • 网站框架
          • 溢出层与对话框 | Labvanced
        • 试验时间线
        • 刺激呈现
        • 反应的正确性
        • 对象
        • 事件
        • 变量
        • 任务向导
        • AI助手
        • 试验系统
        • 实验设计
          • 创建研究
          • 在 Labvanced 中导入模板
          • 数据框模式
          • 多用户实验设计
          • 纵向实验设计
      • 特色主题

        • 随机化与平衡
        • 眼动追踪
          • 在眼动追踪任务中呈现刺激
          • 如何选择眼动追踪校准设置
          • 在任务中设置眼动追踪
          • 记录和导出注视数据
          • 使用形状作为兴趣区域 (AOI) 进行眼动跟踪
          • 参与者校准体验
        • 网络桥接
          • 选择网站 AOI | 锚点、调整和验证 AOI 跟踪
          • 在网站区域(AOI)上跟踪鼠标行为 | Web Bridge指南
        • 问卷
        • 桌面应用
        • 示例研究
        • 参与者招募
        • API访问
          • REST API
          • Webhook API
          • WebSocket API
        • 其他主题

          • 精确的刺激时间
          • 多用户研究
          • 头部追踪在 Labvanced 中 | 指南
      • 主应用标签

        • 概览:主标签
        • 仪表板
        • 我的研究
        • 共享研究
        • 我的文件
        • 实验库
        • 我的账户
        • 许可证与服务
      • 研究标签

        • 概览:研究特定标签
        • 研究设计
          • 任务
          • 区块
          • 会话
          • 组
        • 任务编辑器
          • 任务控制
          • 试验系统
          • 框架类型
          • 对象
          • 对象属性表
          • 变量
          • 系统变量表
          • 事件系统
          • 文本编辑器功能
          • 任务编辑器中的眼动追踪选项
          • 任务中的头部追踪
          • 多用户研究
        • 设置
        • 变量
        • 媒体
        • 文本与翻译
        • 启动与参与
        • 受试者管理
        • 数据视图和导出
    • 视频教程
      • 视频概述
      • 在 Labvanced 中入门
      • 创建任务
      • 元素视频
      • 事件与变量
      • 高级主题
    • 演练
      • 介绍
      • 斯特鲁普任务
      • 词汇决策任务
      • 波斯纳注视提示任务
      • 注意盲点闪烁范式
      • 眼动追踪示例研究
      • 婴儿眼动追踪研究
      • 使用鼠标追踪的注意捕获研究
      • 快速串行视觉呈现
      • ChatGPT 研究
      • 眼动追踪演示:将 SVG 作为关注区域
      • 多用户演示:显示参与者的光标
      • 游戏手柄/操纵杆控制器 - 基本设置
      • 带有 EEG 集成的桌面应用研究
      • 被试间组平衡和变量设置
      • 构建多用户研究
      • 网站框架眼动追踪演练
      • 条件网络摄像头眼动追踪
      • 文本分段研究构建
      • 构建一个与 AI 的研究
    • 常见问题
      • 功能
      • 支持政策与指南
      • 安全与数据隐私
      • 许可
      • Labvanced 的精确度
      • 编程使用与 API
      • 离线使用 Labvanced
      • 故障排除
      • 研究创建问题
    发送到 Websocket 动作将消息从 Labvanced 研究发送到外部脚本

    发送到 Websocket 动作

    Send To Websocket 动作从运行中的研究发送消息到监听 WebSocket 连接的程序,例如本地 Python 脚本、录音设备或外部服务器。该消息可以携带变量的值,该动作还可以发送记录的图像、音频或视频文件。

    目录

    • 概述
    • 工作原理
    • 工作流程提示
    • 研究与示例场景

    概述

    Send To Websocket 动作在动作选择菜单中列在 API Actions 类别下。与 Websocket 触发器 一起,它为研究提供了与在 Labvanced 外部运行的软件的双向通信。

    常见用例

    Send To Websocket 动作在研究中发生的任何事情需要被外界知晓的地方使用。

    • 将事件标记发送到记录系统: 在刺激开始时、响应或条件变化时,研究向本地脚本发送标记,该脚本将其转换为 Lab Streaming Layer 标记,因此它与 EEG 和眼动追踪流一起时间戳。请参见 EEG 与硬件集成。
    • 将数据传递给服务器: 研究将参与者的响应或计算值发送到处理它的服务器,例如分析或机器学习过程。
    • 发送记录的媒体: 记录的图像、音频或视频文件发送到存储或分析它的程序。

    工作原理

    要访问 Send To Websocket 动作,请在任务编辑器中打开 事件系统,并选择或创建一个事件。在动作区域中,打开 API Actions 类别并选择 Send To Websocket。

    一旦连接在研究设置中启用,动作便可用。如果菜单中的 Send To Websocket 变灰,请先启用它:

    1. 打开 Settings 标签。
    2. 打开 Special Features 下拉菜单并找到 Websocket Connection 部分。
    3. 勾选启用该选项,然后输入 WebSocket Address 和 Port。默认值为 ws://localhost 和 8081,这连接到与研究运行在同一计算机上的脚本。

    该对话框包含以下内容:

    选项描述
    Websocket Address显示来自您的研究设置的地址。此处无法编辑。
    Port显示来自您的研究设置的端口。此处无法编辑。
    Data Type选择该动作发送的内容。 Text / JSON 发送一条消息和一个可选的变量值。 Binary (image/audio/video) 发送一个记录的文件。
    Trigger / message to send消息标签,例如 trigger1。此字段仅在 Text / JSON 时出现。
    Send Variable发送其值的变量。对于 Text / JSON 是可选的,对于 Binary (image/audio/video) 是必需的。选择它会打开变量选择器。

    对于 Binary (image/audio/video),选择一个持有录音的变量,例如音频或视频录音的变量。如果该变量此时不持有录音,则不会发送任何内容。

    接收程序得到的内容

    该动作仅在 Labvanced 外部的程序正在监听时才有效。该程序,通常是同一计算机上的短脚本,运行研究连接到的 WebSocket 服务器并读取研究发送的每条消息。

    使用 Text / JSON,每条消息有两个部分:

    • 一个标签: 来自 Trigger / message to send 的文本,例如 trigger1。接收程序用它区分消息类型。
    • 内容: 在 Send Variable 下选择的变量的当前值。如果未选择变量,则消息仅有标签。

    使用 Binary (image/audio/video),该动作单独发送记录的文件,而没有标签。

    对于编写接收脚本的人来说,Text / JSON 消息是一个 JSON 对象,包含用于标签的字段 msg 和内容的字段 value,而 value 在未选择变量时为 null。在 Labvanced WebSocket API GitHub 存储库 中的示例脚本接收来自研究的消息并将其作为 LSL 标记发送出去,是一个很好的起点。有关连接设置,请参见 WebSocket API 指南。

    工作流程提示

    • 在开始研究之前先启动您的脚本。研究开始时会打开连接。
    • 在收集数据之前,测试研究与脚本在同一计算机上运行的连接。默认 ws://localhost 仅可访问在该计算机上的程序。
    • 在 Send Variable 中发送条件标签或试验号,当接收方需要知道哪个刺激属于哪个标记时。
    • 将该动作放置在您希望标记的时刻触发的事件中,例如帧开始或单击,以便在该时刻发送消息。

    研究与示例场景

    将标记发送到 LSL。 在 LSL 发送标记 库研究中,一个输入字段提供标记值,一个按钮单击将其通过此动作发送到本地 Python 服务器。该服务器将消息转换为 LSL 标记。在库中使用 Inspect 选项以查看事件设置。

    双向消息传递。 套接字连接示例 库研究通过此动作将消息发送出研究,并使用 Websocket 触发器响应回复。

    深入阅读

    Websocket 触发器

    Websocket 触发器

    用于响应来自外部程序的消息的配对触发器。

    WebSocket API

    WebSocket API

    如何将研究连接到本地脚本或外部服务器。

    值选择菜单

    值选择菜单

    如何在动作对话框中引用值。

    事件概述

    事件概述

    Labvanced 中触发器和动作逻辑系统的完整介绍。