## Phase 8: Enterprise Extractor Improvements ✅ - 14 security extractors (TLS, JWT, SQL injection, XSS, etc.) - 10 framework-specific extractors (Spring, Django, Rails, etc.) - Config file security detection (YAML, TOML) ## Phase 9: Autonomous Extractor Generation ✅ - Shadow mode executor with TP/FP tracking - Graduation pipeline with confidence thresholds - Auto-rollback on regression detection - Cross-project pattern syncing ## UAT Suite Complete (14 scripts, 90 tests) - test-core-detection.sh (6 tests) - test-declarative-extractors.sh (5 tests) - test-domain-frameworks.sh (5 tests) - test-domain-unreal.sh (3 tests) - test-llm-extraction.sh (6 tests) - test-eval-harness.sh (5 tests) - test-cross-language.sh (3 tests) - test-precommit-performance.sh (4 tests) - test-output-formats.sh (8 tests) - test-drift-detection.sh (6 tests) - test-exit-codes.sh (12 tests) + 3 more scripts ## Other Changes - Updated roadmap to mark Phase 8-9 complete - Added .gitignore entries for build artifacts - Updated pre-commit: 800 line limit, exclude tests/data/cmd Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32 lines
1.0 KiB
Go
32 lines
1.0 KiB
Go
package elevenlabs
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
)
|
|
|
|
// TextToSpeech generates speech from text using the default output format.
|
|
// Returns raw audio bytes (MP3 by default).
|
|
func (c *Client) TextToSpeech(ctx context.Context, voiceID string, req TextToSpeechRequest) ([]byte, error) {
|
|
return c.TextToSpeechWithFormat(ctx, voiceID, req, DefaultOutputFormat)
|
|
}
|
|
|
|
// TextToSpeechWithFormat generates speech from text with a specific output format.
|
|
// Returns raw audio bytes in the requested format.
|
|
func (c *Client) TextToSpeechWithFormat(ctx context.Context, voiceID string, req TextToSpeechRequest, format OutputFormat) ([]byte, error) {
|
|
if voiceID == "" {
|
|
return nil, fmt.Errorf("%w: voice ID is required", ErrInvalidConfig)
|
|
}
|
|
if req.Text == "" {
|
|
return nil, fmt.Errorf("%w: text is required", ErrInvalidConfig)
|
|
}
|
|
|
|
// Set default model if not specified
|
|
if req.ModelID == "" {
|
|
req.ModelID = DefaultModel
|
|
}
|
|
|
|
path := fmt.Sprintf("/text-to-speech/%s", voiceID)
|
|
return c.doRequestRaw(ctx, "POST", path, req, format)
|
|
}
|