Replay
Replay command
The replay
command allows you to replay previously recorded conversations with your Voiceflow project. This is useful for testing changes to your project with consistent inputs, demonstrating flows, or debugging issues.
Usage
voiceflow dialog replay -f RECORD_FILE [options]
Options
Option | Shorthand | Description |
---|---|---|
--record-file | -f | Path to the recorded conversation file (required) |
--environment | -e | Environment to use (default: "development") |
--user-id | -u | User ID for the conversation (optional) |
Examples
Replay a recorded conversation
voiceflow dialog replay -f my-conversation.json
This will replay all interactions from the recording file against your Voiceflow project.
Replay with a specific user ID
voiceflow dialog replay -f my-conversation.json --user-id user123
This allows you to maintain consistent user state or test with specific user profiles.
Replay in production environment
voiceflow dialog replay -f my-conversation.json -e production
Replays the conversation using your production environment settings.
How replay works
The replay
command:
- Reads the recorded conversation file specified with
-f
- Processes each interaction in sequence, automatically sending user inputs to the Voiceflow API
- Displays the responses from your Voiceflow project for each interaction
- Adds brief pauses between interactions to simulate natural conversation timing
Creating recording files
To create a file for replay, use the dialog start
command with the --record-file
option:
voiceflow dialog start --record-file my-conversation.json
During the conversation, every interaction will be saved to the specified file. When you finish the conversation (by typing exit
or pressing Ctrl+C
), the complete recording will be available for replay.
Troubleshooting
If the replay produces different results than the original conversation:
- Check if your Voiceflow project has been modified since the recording
- Verify you're using the same environment that was used during recording
- Consider using a consistent user ID if your project relies on user-specific state
- Ensure any external APIs or services your project depends on are available
Updated 2 days ago