from app import app
import werkzeug

# Check URL map  
for rule in app.url_map.iter_rules():
    if 'voices' in rule.rule:
        print(f"Rule: {rule.rule}, Methods: {rule.methods}, Endpoint: {rule.endpoint}")

# Try to manually resolve
adapter = app.url_map.bind('')
try:
    endpoint, values = adapter.match('/api/voices', method='GET')
    print(f"\nMatched: endpoint={endpoint}, values={values}")
except Exception as e:
    print(f"\nMatch FAILED: {e}")

# Check the actual view function
print("\nView functions with 'voice':")
for name, func in app.view_functions.items():
    if 'voice' in name.lower():
        print(f"  {name}: {func}")
